mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-30 22:43:14 +03:00
Don't mess with parser options in htmlParseDocument
Don't set ctxt->html. This member should already be initialized. Set ctxt->linenumbers in htmlCtxtUseOptions like the XML parser does.
This commit is contained in:
@ -4915,8 +4915,6 @@ htmlParseDocument(htmlParserCtxtPtr ctxt) {
|
|||||||
"htmlParseDocument: context error\n", NULL, NULL);
|
"htmlParseDocument: context error\n", NULL, NULL);
|
||||||
return(XML_ERR_INTERNAL_ERROR);
|
return(XML_ERR_INTERNAL_ERROR);
|
||||||
}
|
}
|
||||||
ctxt->html = 1;
|
|
||||||
ctxt->linenumbers = 1;
|
|
||||||
GROW;
|
GROW;
|
||||||
/*
|
/*
|
||||||
* SAX: beginning of the document processing.
|
* SAX: beginning of the document processing.
|
||||||
@ -6876,6 +6874,7 @@ htmlCtxtUseOptions(htmlParserCtxtPtr ctxt, int options)
|
|||||||
options -= HTML_PARSE_NOIMPLIED;
|
options -= HTML_PARSE_NOIMPLIED;
|
||||||
}
|
}
|
||||||
ctxt->dictNames = 0;
|
ctxt->dictNames = 0;
|
||||||
|
ctxt->linenumbers = 1;
|
||||||
return (options);
|
return (options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user