Org-mode mailing list
 help / color / mirror / Atom feed
* org-mode Publishing fails xhtml validation and LibreJS test.
@ 2020-12-12 17:59 Colin Baxter
  2020-12-13  0:57 ` Tim Cross
  0 siblings, 1 reply; 4+ messages in thread
From: Colin Baxter @ 2020-12-12 17:59 UTC (permalink / raw)
  To: emacs-orgmode

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.

Best wishes,

Colin Baxter.




Colin Baxter
URL: http://www.Colin-Baxter.com
---------------------------------------------------------------------
GnuPG fingerprint: 68A8 799C 0230 16E7 BF68  2A27 BBFA 2492 91F5 41C8
---------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: org-mode Publishing fails xhtml validation and LibreJS test.
  2020-12-12 17:59 org-mode Publishing fails xhtml validation and LibreJS test Colin Baxter
@ 2020-12-13  0:57 ` Tim Cross
  2020-12-13  7:20   ` Colin Baxter
  2020-12-13 15:53   ` Jean Louis
  0 siblings, 2 replies; 4+ messages in thread
From: Tim Cross @ 2020-12-13  0:57 UTC (permalink / raw)
  To: emacs-orgmode


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: org-mode Publishing fails xhtml validation and LibreJS test.
  2020-12-13  0:57 ` Tim Cross
@ 2020-12-13  7:20   ` Colin Baxter
  2020-12-13 15:53   ` Jean Louis
  1 sibling, 0 replies; 4+ messages in thread
From: Colin Baxter @ 2020-12-13  7:20 UTC (permalink / raw)
  To: Tim Cross; +Cc: , emacs-orgmode

Dear Time,

>>>>> Tim Cross <theophilusx@gmail.com> writes:

    > 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?

I believe it remains important to have XHTML compliance, a view which
would seem consistent with W3C's retention of its validation service.

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

I think this might be a good idea. And if it gets rid of the non-free
javascript (as defined by LibreJS and therefore by gnu) then so much the
better.

Best wishes,

Colin Baxter.



Colin Baxter
URL: http://www.Colin-Baxter.com
---------------------------------------------------------------------
GnuPG fingerprint: 68A8 799C 0230 16E7 BF68  2A27 BBFA 2492 91F5 41C8
---------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: org-mode Publishing fails xhtml validation and LibreJS test.
  2020-12-13  0:57 ` Tim Cross
  2020-12-13  7:20   ` Colin Baxter
@ 2020-12-13 15:53   ` Jean Louis
  1 sibling, 0 replies; 4+ messages in thread
From: Jean Louis @ 2020-12-13 15:53 UTC (permalink / raw)
  To: Tim Cross; +Cc: emacs-orgmode

* Tim Cross <theophilusx@gmail.com> [2020-12-13 04:09]:
> 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?

There is no deprecation of XHTML, not until there comes XHTML5. And
XHTML will remain for good number of years. It serves slightly
different purpose and is more suitable for Org exports due to its
rigid structure.

XHTML must all the time be valid. Org export function should, when
possible, or by user configured, include the validator check.

It would not be good to switch to HTML5 because software does not
produce XHTML well. It is better finding those bugs.

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

Here are ways to make it compatible with LibreJS:
https://www.gnu.org/software/librejs/free-your-javascript.html

Jean


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-13 17:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-12 17:59 org-mode Publishing fails xhtml validation and LibreJS test Colin Baxter
2020-12-13  0:57 ` Tim Cross
2020-12-13  7:20   ` Colin Baxter
2020-12-13 15:53   ` Jean Louis

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://orgmode.org/list/0 list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ https://orgmode.org/list \
		emacs-orgmode@gnu.org
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git