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

html: Avoid HTML_PARSE_HTML5 clashing with XML_PARSE_NOENT

There are several users that pass invalid XML parser options to the
HTML parser. Choose a value that is less likely to clash.
This commit is contained in:
Nick Wellnhofer
2025-04-18 17:28:24 +02:00
parent 6896f478d4
commit 4ba1f9238a
2 changed files with 6 additions and 3 deletions

View File

@@ -5768,7 +5768,10 @@ htmlCtxtSetOptionsInternal(xmlParserCtxtPtr ctxt, int options, int keepMask)
ctxt->linenumbers = 1;
return(options & ~allMask);
/*
* Allow XML_PARSE_NOENT which many users set on the HTML parser.
*/
return(options & ~allMask & ~XML_PARSE_NOENT);
}
/**