Re: HTML export meta tag

2023-05-30 Thread Max Nikulin

On 30/05/2023 03:37, Timothy wrote:

The things is the ox-html exporter currently tries to (mostly) support XHTML,
which as I understand requires the self-closing slash.


ox-html has

(:html-doctype "HTML_DOCTYPE" nil org-html-doctype)

option that may be set to e.g. xhtml-11 or html5. Ideally both syntax 
variants should be supported, with "/" before ">" and without it.





Re: HTML export meta tag

2023-05-30 Thread Ihor Radchenko
Scott Randby  writes:

> Okay, but when I try to validate my page as XHTML, I get numerous errors that 
> would be inconvenient to fix especially since I'm only interested in 
> obtaining valid HTML. What I think I'll do is to edit the 
> org-html--build-meta-entry function in my ox-html.el file to eliminate the 
> trailing slash. I'll just have to remember to do that every time I upgrade 
> Org.

No need to remember.
You can (1) use git version of Org with your patch on top; (2) the same
via straight.el, which is rebase things for you automatically; (3)
https://github.com/radian-software/el-patch

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: HTML export meta tag

2023-05-29 Thread Scott Randby

On 5/29/23 16:37, Timothy wrote:

Hi Scott,


Just to give some support to my request, the HTML standard
() says this:
“Then, if the element is one of the void elements, or if the element is a
foreign element, then there may be a single U+002F SOLIDUS character (/), which
on foreign elements marks the start tag as self-closing. On void elements, it
does not mark the start tag as self-closing but instead is unnecessary and has
no effect of any kind. For such void elements, it should be used only with
caution — especially since, if directly preceded by an unquoted attribute value,
it becomes part of the attribute value rather than being discarded by the
parser.”


The things is the ox-html exporter currently tries to (mostly) support XHTML,
which as I understand requires the self-closing slash.

I think what’s really needed is an HTML export implementation that can more
easily support different “modes” of export, but somebody needs to work on that
.


Okay, but when I try to validate my page as XHTML, I get numerous errors that 
would be inconvenient to fix especially since I'm only interested in obtaining 
valid HTML. What I think I'll do is to edit the org-html--build-meta-entry 
function in my ox-html.el file to eliminate the trailing slash. I'll just have 
to remember to do that every time I upgrade Org.

Scott



Re: HTML export meta tag

2023-05-29 Thread Timothy
Hi Scott,

> Just to give some support to my request, the HTML standard
> () says this:
> “Then, if the element is one of the void elements, or if the element is a
> foreign element, then there may be a single U+002F SOLIDUS character (/), 
> which
> on foreign elements marks the start tag as self-closing. On void elements, it
> does not mark the start tag as self-closing but instead is unnecessary and has
> no effect of any kind. For such void elements, it should be used only with
> caution — especially since, if directly preceded by an unquoted attribute 
> value,
> it becomes part of the attribute value rather than being discarded by the
> parser.”

The things is the ox-html exporter currently tries to (mostly) support XHTML,
which as I understand requires the self-closing slash.

I think what’s really needed is an HTML export implementation that can more
easily support different “modes” of export, but somebody needs to work on that
.

All the best,
Timothy

-- 
Timothy (‘tecosaur’/‘TEC’), Org mode contributor.
Learn more about Org mode at .
Support Org development at ,
or support my work at .


Re: HTML export meta tag

2023-05-29 Thread Scott Randby

On 5/29/23 14:07, Ihor Radchenko wrote:

Scott Randby  writes:




This did not happen when I used Org 9.4.6:



I wouldn't care about this change, but when I validate the page code 
(https://validator.w3.org/) I get the following: "Info: Trailing slash on void 
elements has no effect and interacts badly with unquoted attribute values."


Timothy, may you take a look?


Just to give some support to my request, the HTML standard 
(https://html.spec.whatwg.org/multipage/syntax.html#start-tags) says this: "Then, if 
the element is one of the void elements, or if the element is a foreign element, then 
there may be a single U+002F SOLIDUS character (/), which on foreign elements marks the 
start tag as self-closing. On void elements, it does not mark the start tag as 
self-closing but instead is unnecessary and has no effect of any kind. For such void 
elements, it should be used only with caution — especially since, if directly preceded by 
an unquoted attribute value, it becomes part of the attribute value rather than being 
discarded by the parser."

Scott




Re: HTML export meta tag

2023-05-29 Thread Ihor Radchenko
Scott Randby  writes:

> 
>
> This did not happen when I used Org 9.4.6:
>
> 
>
> I wouldn't care about this change, but when I validate the page code 
> (https://validator.w3.org/) I get the following: "Info: Trailing slash on 
> void elements has no effect and interacts badly with unquoted attribute 
> values."

Timothy, may you take a look?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at