gutenbergtools / ebookmaker

The Project Gutenberg tool to generate EPUBs and other ebook formats.
GNU General Public License v3.0
78 stars 17 forks source link

<u> element not allowed in epub #210

Closed eshellman closed 8 months ago

eshellman commented 9 months ago

use of the u element in problematic - it once meant "underline" but html5 brought it back as "unarticulated text". as a result, it validates in epub3 and html5, but raises a validation error in epub2

We should replace it with a span element with underline style.

Example error:

2023-12-29 19:00:26,322 CRITICAL  #72540 ERROR(RSC-005): /export/sunsite/users/gutenbackend/cache/epub/72540/pg72540-images.epub/OEBPS/3189201508802989844_72540-h-3.htm.html(197,24): Error while parsing file: element "u" not allowed anywhere; expected the element end-tag, text or element "a", "abbr", "acronym", "address", "applet", "b", "bdo", "big", "blockquote", "br", "cite", "code", "del", "dfn", "div", "dl", "em", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img", "ins", "kbd", "map", "noscript", "ns:svg", "object", "ol", "p", "pre", "q", "samp", "script", "small", "span", "strong", "sub", "sup", "table", "tt", "ul" or "var" (with xmlns:ns="http://www.w3.org/2000/svg")
ERROR(RSC-005): /export/sunsite/users/gutenbackend/cache/epub/72540/pg72540-images.epub/OEBPS/3189201508802989844_72540-h-3.htm.html(233,24): Error while parsing file: element "u" not allowed anywhere; expected the element end-tag, text or element "a", "abbr", "acronym", "address", "applet", "b", "bdo", "big", "blockquote", "br", "cite", "code", "del", "dfn", "div", "dl", "em", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img", "ins", "kbd", "map", "noscript", "ns:svg", "object", "ol", "p", "pre", "q", "samp", "script", "small", "span", "strong", "sub", "sup", "table", "tt", "ul" or "var" (with xmlns:ns="http://www.w3.org/2000/svg")
ERROR(RSC-005): /export/sunsite/users/gutenbackend/cache/epub/72540/pg72540-images.epub/OEBPS/3189201508802989844_72540-h-3.htm.html(261,24): Error while parsing file: element "u" not allowed anywhere; expected the element end-tag, text or element "a", "abbr", "acronym", "address", "applet", "b", "bdo", "big", "blockquote", "br", "cite", "code", "del", "dfn", "div", "dl", "em", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img", "ins", "kbd", "map", "noscript", "ns:svg", "object", "ol", "p", "pre", "q", "samp", "script", "small", "span", "strong", "sub", "sup", "table", "tt", "ul" or "var" (with xmlns:ns="http://www.w3.org/2000/svg")
ERROR(RSC-005): /export/sunsite/users/gutenbackend/cache/epub/72540/pg72540-images.epub/OEBPS/3189201508802989844_72540-h-3.htm.html(284,24): Error while parsing file: element "u" not allowed anywhere; expected the element end-tag, text or element "a", "abbr", "acronym", "address", "applet", "b", "bdo", "big", "blockquote", "br", "cite", "code", "del", "dfn", "div", "dl", "em", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img", "ins", "kbd", "map", "noscript", "ns:svg", "object", "ol", "p", "pre", "q", "samp", "script", "small", "span", "strong", "sub", "sup", "table", "tt", "ul" or "var" (with xmlns:ns="http://www.w3.org/2000/svg")