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:
7
SAX.c
7
SAX.c
@@ -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;
|
||||
|
Reference in New Issue
Block a user