1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00

Fix handling of unexpected EOF in xmlParseContent

Readd the XML_ERR_TAG_NOT_FINISHED error on unexpected EOF which was
removed in commit 62150ed2.

This commit also introduced a regression for direct users of
xmlParseContent. Unclosed tags weren't checked.
This commit is contained in:
Nick Wellnhofer
2021-05-08 20:21:29 +02:00
parent 3e80560d4b
commit de5b624f10
4 changed files with 45 additions and 11 deletions

View File

@@ -71,8 +71,8 @@ class TestCase(unittest.TestCase):
(s,len(s),"dummy.xml",None,0),
libxml2.treeError,
domain=libxml2.XML_FROM_PARSER,
code=libxml2.XML_ERR_LTSLASH_REQUIRED,
message='EndTag: \'</\' not found\n',
code=libxml2.XML_ERR_TAG_NOT_FINISHED,
message='Premature end of data in tag x line 1\n',
level=libxml2.XML_ERR_FATAL,
file='dummy.xml',
line=3)