mirror of
https://gitlab.gnome.org/GNOME/libxml2
synced 2025-03-28 21:33:13 +00:00
parser: Make XML_PARSE_NSCLEAN option work again
This commit is contained in:
parent
0ba22c0513
commit
7615fae62e
8
parser.c
8
parser.c
@ -1685,6 +1685,10 @@ xmlParserNsPush(xmlParserCtxtPtr ctxt, const xmlHashedString *prefix,
|
||||
xmlErrAttributeDup(ctxt, NULL, BAD_CAST "xmlns");
|
||||
return(0);
|
||||
}
|
||||
|
||||
if ((ctxt->options & XML_PARSE_NSCLEAN) &&
|
||||
(uri->name == ctxt->nsTab[oldIndex * 2 + 1]))
|
||||
return(0);
|
||||
}
|
||||
|
||||
ctxt->nsdb->defaultNsIndex = ctxt->nsNr;
|
||||
@ -1709,6 +1713,10 @@ xmlParserNsPush(xmlParserCtxtPtr ctxt, const xmlHashedString *prefix,
|
||||
return(0);
|
||||
}
|
||||
|
||||
if ((ctxt->options & XML_PARSE_NSCLEAN) &&
|
||||
(uri->name == ctxt->nsTab[bucket->index * 2 + 1]))
|
||||
return(0);
|
||||
|
||||
bucket->index = ctxt->nsNr;
|
||||
goto populate_entry;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user