Permalink
Browse files

found another bug while looking at #309616 on missing entities. this

* parser.c: found another bug while looking at #309616 on missing
  entities.
* result/ent2.sax* result/ent7.sax* result/xml2.sax*: this changed the
  SAX stream in missing conditions for a few tests
Daniel
  • Loading branch information...
1 parent 2644ab2 commit 53bd1f3c2c6a5bf079dbb37813a327838ad9a75c Daniel Veillard committed Aug 24, 2005
Showing with 18 additions and 0 deletions.
  1. +7 −0 ChangeLog
  2. +5 −0 parser.c
  3. +1 −0 result/ent2.sax
  4. +1 −0 result/ent2.sax2
  5. +1 −0 result/ent7.sax
  6. +1 −0 result/ent7.sax2
  7. +1 −0 result/xml2.sax
  8. +1 −0 result/xml2.sax2
View
@@ -1,3 +1,10 @@
+Wed Aug 24 16:44:41 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: found another bug while looking at #309616 on missing
+ entities.
+ * result/ent2.sax* result/ent7.sax* result/xml2.sax*: this changed the
+ SAX stream in missing conditions for a few tests
+
Wed Aug 24 16:19:00 CEST 2005 Daniel Veillard <daniel@veillard.com>
* encoding.c: applied the patch suggested #309565 which can avoid
View
@@ -6100,6 +6100,11 @@ xmlParseEntityRef(xmlParserCtxtPtr ctxt) {
} else {
xmlErrMsgStr(ctxt, XML_WAR_UNDECLARED_ENTITY,
"Entity '%s' not defined\n", name);
+ if ((ctxt->inSubset == 0) &&
+ (ctxt->sax != NULL) &&
+ (ctxt->sax->reference != NULL)) {
+ ctxt->sax->reference(ctxt, name);
+ }
}
ctxt->valid = 0;
}
View
@@ -11,6 +11,7 @@ SAX.characters(
, 3)
SAX.getEntity(title)
SAX.error: Entity 'title' not defined
+SAX.reference(title)
SAX.characters(
This text is about XML, the, 31)
SAX.getEntity(xml)
View
@@ -11,6 +11,7 @@ SAX.characters(
, 3)
SAX.getEntity(title)
SAX.error: Entity 'title' not defined
+SAX.reference(title)
SAX.characters(
This text is about XML, the, 31)
SAX.getEntity(xml)
View
@@ -11,6 +11,7 @@ SAX.error: PEReference: %sampleEnt; not found
SAX.characters('they called me , 16)
SAX.getEntity(sampleEnt)
SAX.error: Entity 'sampleEnt' not defined
+SAX.reference(sampleEnt)
SAX.characters(', 1)
SAX.endDocument()
xmlSAXUserParseFile returned error 27
View
@@ -11,6 +11,7 @@ SAX.error: PEReference: %sampleEnt; not found
SAX.characters('they called me , 16)
SAX.getEntity(sampleEnt)
SAX.error: Entity 'sampleEnt' not defined
+SAX.reference(sampleEnt)
SAX.characters(', 1)
SAX.endDocument()
xmlSAXUserParseFile returned error 27
View
@@ -12,6 +12,7 @@ SAX.error: PEReference: %xx; not found
SAX.characters(This sample shows a , 20)
SAX.getEntity(tricky)
SAX.error: Entity 'tricky' not defined
+SAX.reference(tricky)
SAX.characters( method., 8)
SAX.endDocument()
xmlSAXUserParseFile returned error 27
View
@@ -12,6 +12,7 @@ SAX.error: PEReference: %xx; not found
SAX.characters(This sample shows a , 20)
SAX.getEntity(tricky)
SAX.error: Entity 'tricky' not defined
+SAX.reference(tricky)
SAX.characters( method., 8)
SAX.endDocument()
xmlSAXUserParseFile returned error 27

0 comments on commit 53bd1f3

Please sign in to comment.