emacs-orgmode
[Top][All Lists]
Advanced

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

Re: ox.html causes w3c xhtml validation


From: Colin Baxter
Subject: Re: ox.html causes w3c xhtml validation
Date: Mon, 16 Mar 2020 08:38:24 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

>>>>> Kyle Meyer <address@hidden> writes:

    > Adam Porter <address@hidden> writes:
    >> Colin Baxter <address@hidden> writes:
    >> 
    >>> 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!
    >> 
    >> Looking at the error message, the fix might be very simple:
    >> 
    >> The most common cause of this error is unencoded ampersands in
    >> URLs as described by the WDG in "Ampersands in URLs".

    > Hmm, perhaps it is as simple as encoding the ampersand.  That
    > won't work with inline javascript, if I'm understanding correctly
    > the link I gave in my reply.  *But*, despite being embedded
    > javascript, the librejs magnet link happens within a comment, so I
    > suppose it really just comes down to how librejs treats it.
    > Poking around in librejs (525e3a5), it seems it is clever and will
    > s/&amp;/&/:

    >     // Match by link on first parameter (legacy) if
    > (licenses[key]["Magnet link"] === first.replace("&amp;","&") ||
    > licenses[key]["URL"] === first.replace("&amp;","&")) { return
    > [true, `Recognized license: "${licenses[key]['Name']}".`];

    > Colin, could you try exporting with the change below and see if
    > that resolves your validation issues?  It'd also be great if you
    > could check whether librejs is still happy after that change.

I've now applied the patch to my local org-mode and exported the
file "index.org". It seems to work because I now get "This document was
successfully checked as XHTML 1.0 Strict!" when validating by uploading
the html file "index.html" to http://validator.w3.org/.

As to librejs, I don't actually use js on my web-site so apart from the
js license information in the html header there is no js on the
page. However, I've opened my "index.html" file with icecat (v52.3.0 32
bit) and get the following output:

---------- Begin -----

List of accepted JavaScript in file:///home/redknight/public_html/index.html

    LibreJS did not allow the execution of any scripts on this page: '
        There may be no scripts on this page (check source, C-u)
        The inline and on-page JavaScript code may not be free and/or
        may not have proper license information and external scripts (if
        present) may have been removed by default. 
        External scripts may not be free and/or may not have proper
        licensing and are not part of the whitelist of free JavaScript
        libraries. 

List of blocked JavaScript in file:///home/redknight/public_html/index.html

    LibreJS did not block any scripts on this page:
        There may be no scripts on this page (check source, C-u).
        All the scripts on this page may be trivial and/or free.
        You may have whitelisted this domain name or url from the
        preferences (Type about:addons in your location bar to check) 
        You may have clicked the "allow all scripts" button, which
        causes LibreJS to load all JavaScript on a page regardless of
        whether it is free, trivial, nontrivial or nonfree. This policy
        is effective for the entire duration of a Firefox session. 
        If for any reason you think LibreJS should have blocked
        JavaScript code on this page, please report this issue to:
        address@hidden
        
---------- End -----

I hope this helps - and thanks

Best wishes,

-- 
Colin Baxter
www.Colin-Baxter.com



reply via email to

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