Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixing bug #166777 (and #169838), it was an heuristic in areBlanks which

* parser.c: fixing bug #166777 (and #169838), it was an heuristic
  in areBlanks which failed.
* result/winblanks.xml* result/noent/winblanks.xml test/winblanks.xml:
  added the input file to the regression tests
Daniel
  • Loading branch information...
commit abac41e829e0f75eb78be148b24438ddd607676c 1 parent 6d30ff2
Daniel Veillard authored
View
7 ChangeLog
@@ -1,3 +1,10 @@
+Wed Jul 6 17:14:03 CEST 2005 Daniel Veillard <daniel@veillard.com>
+
+ * parser.c: fixing bug #166777 (and #169838), it was an heuristic
+ in areBlanks which failed.
+ * result/winblanks.xml* result/noent/winblanks.xml test/winblanks.xml:
+ added the input file to the regression tests
+
Wed Jul 6 13:40:22 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
* xmlschemastypes.c: Fixed bug #309338, reported by Kupriyanov
View
2  parser.c
@@ -2142,7 +2142,7 @@ static int areBlanks(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
/*
* Otherwise, heuristic :-\
*/
- if (RAW != '<') return(0);
+ if ((RAW != '<') && (RAW != 0xD)) return(0);
if ((ctxt->node->children == NULL) &&
(RAW == '<') && (NXT(1) == '/')) return(0);
View
6 result/noent/winblanks.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<a>
+ <B>
+ <C/>
+</B>
+</a>
View
6 result/winblanks.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<a>
+ <B>
+ <C/>
+</B>
+</a>
View
13 result/winblanks.xml.rde
@@ -0,0 +1,13 @@
+0 1 a 0 0
+1 14 #text 0 1
+
+1 1 B 0 0
+2 14 #text 0 1
+
+2 1 C 1 0
+2 14 #text 0 1
+
+1 15 B 0 0
+1 14 #text 0 1
+
+0 15 a 0 0
View
13 result/winblanks.xml.rdr
@@ -0,0 +1,13 @@
+0 1 a 0 0
+1 14 #text 0 1
+
+1 1 B 0 0
+2 14 #text 0 1
+
+2 1 C 1 0
+2 14 #text 0 1
+
+1 15 B 0 0
+1 14 #text 0 1
+
+0 15 a 0 0
View
18 result/winblanks.xml.sax
@@ -0,0 +1,18 @@
+SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.startElement(a)
+SAX.characters(
+ , 5)
+SAX.startElement(B)
+SAX.characters(
+ , 9)
+SAX.startElement(C)
+SAX.endElement(C)
+SAX.characters( , 3)
+SAX.characters(
+, 1)
+SAX.endElement(B)
+SAX.characters(
+, 1)
+SAX.endElement(a)
+SAX.endDocument()
View
18 result/winblanks.xml.sax2
@@ -0,0 +1,18 @@
+SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.startElementNs(a, NULL, NULL, 0, 0, 0)
+SAX.characters(
+ , 5)
+SAX.startElementNs(B, NULL, NULL, 0, 0, 0)
+SAX.characters(
+ , 9)
+SAX.startElementNs(C, NULL, NULL, 0, 0, 0)
+SAX.endElementNs(C, NULL, NULL)
+SAX.characters( , 3)
+SAX.characters(
+, 1)
+SAX.endElementNs(B, NULL, NULL)
+SAX.characters(
+, 1)
+SAX.endElementNs(a, NULL, NULL)
+SAX.endDocument()
View
5 test/winblanks.xml
@@ -0,0 +1,5 @@
+<a>
+ <B>
+ <C/>
+</B>
+</a>
Please sign in to comment.
Something went wrong with that request. Please try again.