diff --git a/src/calibre/test_build.py b/src/calibre/test_build.py index 5c713f0597..f89b9664c2 100644 --- a/src/calibre/test_build.py +++ b/src/calibre/test_build.py @@ -165,6 +165,9 @@ class BuildTest(unittest.TestCase): self.assertEqual(etree.tostring(root), raw) from lxml import html html.fromstring('
\U0001f63a') + from calibre.utils.xml_parse import safe_xml_fromstring + bad = '\U0001f468' * 8192 + safe_xml_fromstring(f'
\U0001f63a😺{bad}
') def test_certgen(self): from calibre.utils.certgen import create_key_pair