summaryrefslogtreecommitdiff
path: root/entities.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>1999-09-01 12:19:13 +0000
committerDaniel Veillard <veillard@src.gnome.org>1999-09-01 12:19:13 +0000
commit1ff7ae3dfd22cf9b0ca92666b71b347bc4e83594 (patch)
treecccb3d66c7b62e8bf0b79924aaaf0ae186b5b348 /entities.c
parente7a5a77dd0abc0be021415f14027007b9a740991 (diff)
downloadlibxml2-1ff7ae3dfd22cf9b0ca92666b71b347bc4e83594.tar.gz
Fixing two stupid bugs on entities and HTML tree deallocation, Daniel.
Diffstat (limited to 'entities.c')
-rw-r--r--entities.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/entities.c b/entities.c
index 2cedf928..54be393d 100644
--- a/entities.c
+++ b/entities.c
@@ -260,6 +260,15 @@ xmlGetParameterEntity(xmlDocPtr doc, const CHAR *name) {
(!xmlStrcmp(cur->name, name))) return(cur);
}
}
+ if ((doc->extSubset != NULL) && (doc->extSubset->entities != NULL)) {
+ table = (xmlEntitiesTablePtr) doc->extSubset->entities;
+ for (i = 0;i < table->nb_entities;i++) {
+ cur = &table->table[i];
+ if (((cur->type == XML_INTERNAL_PARAMETER_ENTITY) ||
+ (cur->type == XML_EXTERNAL_PARAMETER_ENTITY)) &&
+ (!xmlStrcmp(cur->name, name))) return(cur);
+ }
+ }
return(NULL);
}
@@ -317,6 +326,15 @@ xmlGetDocEntity(xmlDocPtr doc, const CHAR *name) {
(!xmlStrcmp(cur->name, name))) return(cur);
}
}
+ if ((doc->extSubset != NULL) && (doc->extSubset->entities != NULL)) {
+ table = (xmlEntitiesTablePtr) doc->extSubset->entities;
+ for (i = 0;i < table->nb_entities;i++) {
+ cur = &table->table[i];
+ if ((cur->type != XML_INTERNAL_PARAMETER_ENTITY) &&
+ (cur->type != XML_EXTERNAL_PARAMETER_ENTITY) &&
+ (!xmlStrcmp(cur->name, name))) return(cur);
+ }
+ }
if (xmlPredefinedEntities == NULL)
xmlInitializePredefinedEntities();
table = xmlPredefinedEntities;