mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-08-22 01:49:21 +03:00
Copy some XMLReader option flags to parser context
The parser context stores some options both in the "options" bits and extra members like "validate" or "replaceEntities". Which of these are actually read is inconsistent, so make sure to also update the bit field.
This commit is contained in:
@ -3848,16 +3848,20 @@ xmlTextReaderSetParserProp(xmlTextReaderPtr reader, int prop, int value) {
|
||||
return(0);
|
||||
case XML_PARSER_VALIDATE:
|
||||
if (value != 0) {
|
||||
ctxt->options |= XML_PARSE_DTDVALID;
|
||||
ctxt->validate = 1;
|
||||
reader->validate = XML_TEXTREADER_VALIDATE_DTD;
|
||||
} else {
|
||||
ctxt->options &= ~XML_PARSE_DTDVALID;
|
||||
ctxt->validate = 0;
|
||||
}
|
||||
return(0);
|
||||
case XML_PARSER_SUBST_ENTITIES:
|
||||
if (value != 0) {
|
||||
ctxt->options |= XML_PARSE_NOENT;
|
||||
ctxt->replaceEntities = 1;
|
||||
} else {
|
||||
ctxt->options &= ~XML_PARSE_NOENT;
|
||||
ctxt->replaceEntities = 0;
|
||||
}
|
||||
return(0);
|
||||
|
Reference in New Issue
Block a user