mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-13 20:58:16 +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:
parent
f9ea1a24ed
commit
5c7e0a9a46
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user