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

html: Stop reporting syntax errors

It doesn't make much sense to keep the old syntax error handling which
doesn't conform to HTML5.

Handling HTML5 parser errors is rather involved and not essential for
parsers.
This commit is contained in:
Nick Wellnhofer
2024-09-11 17:29:59 +02:00
parent c6af101728
commit e179f3ec0e
8 changed files with 53 additions and 129 deletions

View File

@@ -50,8 +50,7 @@ chunk = "ar</foo>"
ctxt.htmlParseChunk(chunk, len(chunk), 1)
ctxt=None
reference = """startDocument:startElement html None:startElement body None:startElement foo {'url': 'tst'}:error: Tag foo invalid
:characters: bar:endElement foo:endElement body:endElement html:endDocument:"""
reference = """startDocument:startElement html None:startElement body None:startElement foo {'url': 'tst'}:characters: bar:endElement foo:endElement body:endElement html:endDocument:"""
if log != reference:
print("Error got: %s" % log)
print("Exprected: %s" % reference)