emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Arne Babenhauserheide <arne_bab@web.de>
To: Colin Baxter <m43cap@yandex.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: ox.html causes w3c xhtml validation
Date: Sun, 15 Mar 2020 23:40:49 +0100	[thread overview]
Message-ID: <87tv2p1bta.fsf@web.de> (raw)
In-Reply-To: <87d09dz92a.fsf@yandex.com>

Dear Kyle, Dear Colin,

Colin Baxter <m43cap@yandex.com> writes:
>     >> ./lisp/ox-html.el:235:// @license
>     >> magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt
>     >> GPL-v3-or-Later
>     > [...]
>     >> I think the culprit is commit
>     >> 68fa5e589f00c8d5b4f7f0dc70be6ebe59238bb8, 11 Feb.

>     > From what I gather from briefly searching around (mostly based on
>     > this information [0]), I don't think there's an easy fix for
>     > inline javascript.
>
> In my opinion, if it can't be fixed then the changes should be
> removed. Surely, we cannot have an org-mode that knowingly
> exports/publishes something that causes a validation error!
>
>     > I wonder if Arne [+cc], who suggested the change [1], knows of a
>     > solution.

Firstoff: I can reproduce this by using an xhtml header:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">

And second: I just verified that LibreJS still recognizes the license
when we escape the & as &amp;

I would suggest the following:

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 9a1dd44b5..5c2b766e9 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -232,7 +232,7 @@ property on the headline itself.")
 
 (defconst org-html-scripts
   "<script type=\"text/javascript\">
-// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later
+// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&amp;dn=gpl-3.0.txt GPL-v3-or-Later
 <!--/*--><![CDATA[/*><!--*/
      function CodeHighlightOn(elem, id)
      {
@@ -510,12 +510,12 @@ means to use the maximum value consistent with other options."
 
 (defcustom org-html-infojs-template
   "<script type=\"text/javascript\" src=\"%SCRIPT_PATH\">
-// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later
+// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&amp;dn=gpl-3.0.txt GPL-v3-or-Later
 // @license-end
 </script>
 
 <script type=\"text/javascript\">
-// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later
+// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&amp;dn=gpl-3.0.txt GPL-v3-or-Later
 <!--/*--><![CDATA[/*><!--*/
 %MANAGER_OPTIONS
 org_html_manager.setup();  // activate after the parameters are set

Thank you for CC'ing me!

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein
ohne es zu merken

  parent reply	other threads:[~2020-03-15 22:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-15 17:45 ox.html causes w3c xhtml validation Colin Baxter
2020-03-15 18:35 ` Colin Baxter
2020-03-15 19:45 ` Kyle Meyer
2020-03-15 19:56   ` Colin Baxter
2020-03-15 20:34     ` Adam Porter
2020-03-15 21:54       ` Kyle Meyer
2020-03-16  6:50         ` Colin Baxter
2020-03-16  8:38         ` Colin Baxter
2020-03-17  5:15           ` Kyle Meyer
2020-03-17  7:43             ` Colin Baxter
2020-03-15 22:40     ` Arne Babenhauserheide [this message]
2020-03-15 23:59       ` Kyle Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tv2p1bta.fsf@web.de \
    --to=arne_bab@web.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=m43cap@yandex.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).