1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00

fixing bug #95296, when the predefined entities are redefined in the DTD

* SAX.c: fixing bug #95296, when the predefined entities
  are redefined in the DTD the default one must be used
  instead anyway.
Daniel
This commit is contained in:
Daniel Veillard
2002-12-27 11:34:48 +00:00
parent 6647aedd16
commit 8dbd495eca
2 changed files with 12 additions and 1 deletions

7
SAX.c
View File

@@ -338,13 +338,18 @@ xmlEntityPtr
getEntity(void *ctx, const xmlChar *name)
{
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlEntityPtr ret;
xmlEntityPtr ret = NULL;
#ifdef DEBUG_SAX
xmlGenericError(xmlGenericErrorContext,
"SAX.getEntity(%s)\n", name);
#endif
if (ctxt->inSubset == 0) {
ret = xmlGetPredefinedEntity(name);
if (ret != NULL)
return(ret);
}
if ((ctxt->myDoc != NULL) && (ctxt->myDoc->standalone == 1)) {
if (ctxt->inSubset == 2) {
ctxt->myDoc->standalone = 0;