diff --git a/HTMLparser.c b/HTMLparser.c index 4aa9f117..679a0129 100644 --- a/HTMLparser.c +++ b/HTMLparser.c @@ -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); } /** diff --git a/include/libxml/HTMLparser.h b/include/libxml/HTMLparser.h index 00fd2b50..d78b066a 100644 --- a/include/libxml/HTMLparser.h +++ b/include/libxml/HTMLparser.h @@ -203,7 +203,6 @@ XMLPUBFUN void */ typedef enum { HTML_PARSE_RECOVER = 1<<0, /* No effect */ - HTML_PARSE_HTML5 = 1<<1, /* HTML5 support */ HTML_PARSE_NODEFDTD = 1<<2, /* do not default a doctype if not found */ HTML_PARSE_NOERROR = 1<<5, /* suppress error reports */ HTML_PARSE_NOWARNING= 1<<6, /* suppress warning reports */ @@ -214,7 +213,8 @@ typedef enum { HTML_PARSE_COMPACT = 1<<16,/* compact small text nodes */ HTML_PARSE_HUGE = 1<<19,/* relax any hardcoded limit from the parser */ HTML_PARSE_IGNORE_ENC=1<<21,/* ignore internal document encoding hint */ - HTML_PARSE_BIG_LINES= 1<<22 /* Store big lines numbers in text PSVI field */ + HTML_PARSE_BIG_LINES= 1<<22,/* Store big lines numbers in text PSVI field */ + HTML_PARSE_HTML5 = 1<<26 /* HTML5 support */ } htmlParserOption; XMLPUBFUN void