diff --git a/src/calibre/ebooks/oeb/polish/parsing.py b/src/calibre/ebooks/oeb/polish/parsing.py index 85843c1441..9e8dfaff92 100644 --- a/src/calibre/ebooks/oeb/polish/parsing.py +++ b/src/calibre/ebooks/oeb/polish/parsing.py @@ -546,7 +546,7 @@ if len("\U0010FFFF") == 1: # UCS4 build else: replace_chars = re.compile("([\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?a\n

 \nb', discard_namespaces=False) + root = parse_html5('\na\n

 \nb', discard_namespaces=False) print (etree.tostring(root, encoding='utf-8')) print() diff --git a/src/calibre/ebooks/oeb/polish/tests/parsing.py b/src/calibre/ebooks/oeb/polish/tests/parsing.py index 0346821745..256d214fdf 100644 --- a/src/calibre/ebooks/oeb/polish/tests/parsing.py +++ b/src/calibre/ebooks/oeb/polish/tests/parsing.py @@ -10,7 +10,7 @@ from lxml import etree from html5lib.constants import cdataElements, rcdataElements from calibre.ebooks.oeb.polish.tests.base import BaseTest -from calibre.ebooks.oeb.polish.parsing import parse +from calibre.ebooks.oeb.polish.parsing import parse_html5 as parse from calibre.ebooks.oeb.base import XPath, XHTML_NS, SVG_NS, XLINK_NS from calibre.ebooks.oeb.parse_utils import html5_parse