emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: org-mode Publishing fails xhtml validation and LibreJS test.


From: Tim Cross
Subject: Re: org-mode Publishing fails xhtml validation and LibreJS test.
Date: Sun, 13 Dec 2020 11:57:51 +1100
User-agent: mu4e 1.5.7; emacs 27.1.50

Colin Baxter <m43cap@yandex.com> writes:

> Hello,
>
> When publishing, org-mode inserts the following javascript in the xhtml file:
>
> #+begin_src js
> <script type="text/javascript">
> // @license 
> magnet:?xt=urn:btih:e95b018ef3580986a04669f1b5879592219e2a7a&dn=public-domain.txt
>  Public Domain
> <!--/*--><![CDATA[/*><!--*/
>      function CodeHighlightOn(elem, id)
>      {
>        var target = document.getElementById(id);
>        if(null != target) {
>          elem.classList.add("code-highlighted");
>          target.classList.add("code-highlighted");
>        }
>      }
>      function CodeHighlightOff(elem, id)
>      {
>        var target = document.getElementById(id);
>        if(null != target) {
>          elem.classList.remove("code-highlighted");
>          target.classList.remove("code-highlighted");
>        }
>      }
>     /*]]>*///-->
> // @license-end
> </script>
> #+end_src
>
> There are issues with this script.
>
> 1. The script gives errors in XHTML 1.0 Strict validation. For example,
> the line beginning //@license ... gives errors of the type:
>  a. cannot generate system identifier for general entity "dn"
>  b. general entity "dn" not defined and no default entity
>  c. reference not terminated by REFC delimiter
>  etc.
>
> 2. The script fails the LibreJS (gnu.org/software/librejs) tests. This
> can be tested by opining the page in icecat.
>
> In order to pass XHTML and LibreJS validation tests, I have to delete
> the script from my web pages by hand.
>

Given the move to HTML5 and deprecation of XHTML, how valid are XHTML 
compliance requirements
these days? Could it be time to 'reverse' the org defaults and export
using HTML5 by default rather than XHTML?

Would it be sufficient to just have the license information embedded as
a simple comment?


--
Tim Cross



reply via email to

[Prev in Thread] Current Thread [Next in Thread]