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

enhanced to assure that if xpointer is called for a document, the

* xinclude.c: enhanced to assure that if xpointer is called
  for a document, the XML_PARSE_NOENT flag is set before parsing
  the included document so that entities will automatically get
  taken care of.
* xpointer.c: corrected code so that, if an XML_ENTITY_REF node
  is encountered, it will log it and not crash (bug 135713)
This commit is contained in:
William M. Brack
2004-03-08 14:42:31 +00:00
parent a8feb5f401
commit 4d59e22a19
3 changed files with 35 additions and 5 deletions

View File

@@ -2308,6 +2308,7 @@ next:
(*level)++;
goto found;
}
skip: /* This label should only be needed if something is wrong! */
if (cur->next != NULL) {
cur = cur->next;
goto found;
@@ -2328,11 +2329,13 @@ found:
(cur->type != XML_TEXT_NODE) &&
(cur->type != XML_DOCUMENT_NODE) &&
(cur->type != XML_HTML_DOCUMENT_NODE) &&
(cur->type != XML_CDATA_SECTION_NODE))
goto next;
if (cur->type == XML_ENTITY_REF_NODE) {
TODO
}
(cur->type != XML_CDATA_SECTION_NODE)) {
if (cur->type == XML_ENTITY_REF_NODE) { /* Shouldn't happen */
TODO
goto skip;
}
goto next;
}
return(cur);
}