1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-13 09:01:53 +03:00

fixed an erroneous validation bug when PE refs occurs in external parsed

* parser.c: fixed an erroneous validation bug when PE refs
  occurs in external parsed entities referenced from the
  internals subset
* test/valid/index.xml test/valid/dtds/nitf-2-5.dtd
  test/valid/dtds/NewsMLv1.0.dtd result/valid/index.xml*:
  added the associated testcase, it's a nice one.
* HTMLparser.c: generate the DTD node as HTML still ...
* HTMLtree.c: fixed errors in Set/GetMetaEncoding
Daniel
This commit is contained in:
Daniel Veillard
2001-10-23 13:10:19 +00:00
parent b6b0fd8962
commit 5151c06f30
12 changed files with 3522 additions and 11 deletions

View File

@ -2085,7 +2085,8 @@ xmlParseEntityValue(xmlParserCtxtPtr ctxt, xmlChar **orig) {
ctxt->wellFormed = 0;
ctxt->disableSAX = 1;
}
if ((ctxt->inSubset == 1) && (tmp == '%')) {
if ((tmp == '%') && (ctxt->inSubset == 1) &&
(ctxt->inputNr == 1)) {
ctxt->errNo = XML_ERR_ENTITY_PE_INTERNAL;
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
ctxt->sax->error(ctxt->userData,