-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
Milestone
Description
Pandoc version: 2.0, 1.19.2.1
Command:
echo "# Test" > test.md
pandoc -o test.epub -M title="<this> & that" test.md
Expected: The title should be correctly escaped in title_page.xhtml as it is in content.opf:
<dc:title id="epub-title-1"><this> & that</dc:title>
Actual: Title in title_page.xhtml isn't properly escaped:
<h1 class="title"><this> & that</h1>
This causes validation errors:
| Type | File | Line | Position | Message |
|---|---|---|---|---|
| ERROR | EPUB/text/title_page.xhtml | 17 | 27 | Error while parsing file 'element "this" not allowed here; expected the element end-tag, text or element "a", "abbr", "area", "audio", "b", "bdi", "bdo", "br", "button", "canvas", "cite", "code", "command", "datalist", "del", "dfn", "em", "embed", "epub:switch", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "link", "map", "mark", "meta", "meter", "ns1:math", "ns2:svg", "object", "output", "progress", "q", "ruby", "s", "samp", "script", "select", "small", "span", "strong", "sub", "sup", "textarea", "time", "u", "var", "video" or "wbr" (with xmlns:ns1="http://www.w3.org/1998/Math/MathML" xmlns:ns2="http://www.w3.org/2000/svg")'. |
| FATAL | EPUB/text/title_page.xhtml | 17 | 29 | Fatal Error while parsing file 'The entity name must immediately follow the '&' in the entity reference.'. |