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

html: Don't stop on unsupported encoding

Continue to parse unlike in the XML case.
This commit is contained in:
Nick Wellnhofer
2025-06-06 03:29:57 +02:00
parent 416da89d0b
commit 70335c41fc
2 changed files with 12 additions and 10 deletions

View File

@@ -3628,10 +3628,6 @@ htmlCharEncCheckAsciiCompatible(htmlParserCtxt *ctxt,
XML_ENC_INPUT | XML_ENC_HTML,
ctxt->convImpl, ctxt->convCtxt,
&handler);
/*
* TODO: Unlike the XML parser, we shouldn't raise a fatal
* if the encoding is unsupported.
*/
if (res != XML_ERR_OK) {
xmlFatalErr(ctxt, res, (const char *) encoding);
return(-1);
@@ -3711,10 +3707,6 @@ htmlCheckMeta(htmlParserCtxtPtr ctxt, const xmlChar **atts) {
return;
}
/*
* TODO: Unlike the XML parser, we shouldn't raise a fatal
* if the encoding is unsupported.
*/
xmlSetDeclaredEncoding(ctxt, encoding);
}
}