The following document with <, > and & in the metadata section
Author: John Doe
Position: <Writer, Blogger>
Affiliation: John Wiley & Sons
Lorem ipsum dolor sit amet.
Written by [%Author],\
[%Position] at [%Affiliation].
produces this output (using --escaped-line-breaks):
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="author" content="John Doe"/>
<meta name="position" content="<Writer, Blogger>"/>
<meta name="affiliation" content="John Wiley & Sons"/>
</head>
<body>
<p>Lorem ipsum dolor sit amet.</p>
<p>Written by John Doe,<br/>
<Writer, Blogger> at John Wiley & Sons.</p>
</body>
</html>
While the metadata value is correctly escaped in the content-attribute, using the value in a variable leads to invalid HTML which cannot be post-processed with tools which demand well-formed HTML/XML like XSLT.
One remedy when using & is to use
Affiliation: John Wiley & Sons
instead, but that isn't very comfortable. Also this makes it more difficult to use the same document for LaTeX and HTML.
I'd consider this an error, or am I missing something?
The following document with
<
,>
and&
in the metadata sectionproduces this output (using
--escaped-line-breaks
):While the metadata value is correctly escaped in the
content
-attribute, using the value in a variable leads to invalid HTML which cannot be post-processed with tools which demand well-formed HTML/XML like XSLT.One remedy when using
&
is to useinstead, but that isn't very comfortable. Also this makes it more difficult to use the same document for LaTeX and HTML.
I'd consider this an error, or am I missing something?
Thanks, Michael