preparing the release of 2.7.2 fix the Solaris portability issue
* configure.in doc/* NEWS: preparing the release of 2.7.2
* dict.c: fix the Solaris portability issue
* parser.c: additional cleanup on #554660 fix
* test/ent13 result/ent13* result/noent/ent13*: added the
example in the regression test suite.
* HTMLparser.c: handle leading BOM in htmlParseElement()
Daniel
svn path=/trunk/; revision=3799
diff --git a/ChangeLog b/ChangeLog
index d950076..a37871e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Fri Oct 3 09:43:45 CEST 2008 Daniel Veillard <daniel@veillard.com>
+
+ * configure.in doc/* NEWS: preparing the release of 2.7.2
+ * dict.c: fix the Solaris portability issue
+ * parser.c: additional cleanup on #554660 fix
+ * test/ent13 result/ent13* result/noent/ent13*: added the
+ example in the regression test suite.
+ * HTMLparser.c: handle leading BOM in htmlParseElement()
+
Thu Oct 2 22:53:39 CEST 2008 Daniel Veillard <daniel@veillard.com>
* parser.c: fix a nasty bug introduced when cleaning up
diff --git a/HTMLparser.c b/HTMLparser.c
index 202b24a..24b0fc0 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -4120,6 +4120,8 @@
int
htmlParseDocument(htmlParserCtxtPtr ctxt) {
+ xmlChar start[4];
+ xmlCharEncoding enc;
xmlDtdPtr dtd;
xmlInitParser();
@@ -4139,6 +4141,23 @@
if ((ctxt->sax) && (ctxt->sax->setDocumentLocator))
ctxt->sax->setDocumentLocator(ctxt->userData, &xmlDefaultSAXLocator);
+ if ((ctxt->encoding == (const xmlChar *)XML_CHAR_ENCODING_NONE) &&
+ ((ctxt->input->end - ctxt->input->cur) >= 4)) {
+ /*
+ * Get the 4 first bytes and decode the charset
+ * if enc != XML_CHAR_ENCODING_NONE
+ * plug some encoding conversion routines.
+ */
+ start[0] = RAW;
+ start[1] = NXT(1);
+ start[2] = NXT(2);
+ start[3] = NXT(3);
+ enc = xmlDetectCharEncoding(&start[0], 4);
+ if (enc != XML_CHAR_ENCODING_NONE) {
+ xmlSwitchEncoding(ctxt, enc);
+ }
+ }
+
/*
* Wipe out everything which is before the first '<'
*/
@@ -4158,10 +4177,10 @@
while (((CUR == '<') && (NXT(1) == '!') &&
(NXT(2) == '-') && (NXT(3) == '-')) ||
((CUR == '<') && (NXT(1) == '?'))) {
- htmlParseComment(ctxt);
- htmlParsePI(ctxt);
+ htmlParseComment(ctxt);
+ htmlParsePI(ctxt);
SKIP_BLANKS;
- }
+ }
/*
diff --git a/NEWS b/NEWS
index 8c34320..6928d5b 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,17 @@
to the SVN at
http://svn.gnome.org/viewcvs/libxml2/trunk/
code base.Here is the list of public releases:
+2.7.2: Oct 3 2008:
+ - Portability fix: fix solaris compilation problem, fix compilation
+ if XPath is not configured in
+ - Bug fixes: nasty entity bug introduced in 2.7.0, restore old behaviour
+ when saving an HTML doc with an xml dump function, HTML UTF-8 parsing
+ bug, fix reader custom error handlers (Riccardo Scussat)
+
+ - Improvement: xmlSave options for more flexibility to save as
+ XML/HTML/XHTML, handle leading BOM in HTML documents
+
+
2.7.1: Sep 1 2008:
- Portability fix: Borland C fix (Moritz Both)
- Bug fixes: python serialization wrappers, XPath QName corner
diff --git a/config.h.in b/config.h.in
index f8435d4..1285789 100644
--- a/config.h.in
+++ b/config.h.in
@@ -85,6 +85,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
+/* Define to 1 if you have the <inttypes.h.h> header file. */
+#undef HAVE_INTTYPES_H_H
+
/* Define if isinf is there */
#undef HAVE_ISINF
diff --git a/configure.in b/configure.in
index 17dad0b..04f363f 100644
--- a/configure.in
+++ b/configure.in
@@ -5,7 +5,7 @@
LIBXML_MAJOR_VERSION=2
LIBXML_MINOR_VERSION=7
-LIBXML_MICRO_VERSION=1
+LIBXML_MICRO_VERSION=2
LIBXML_MICRO_VERSION_SUFFIX=
LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION$LIBXML_MICRO_VERSION_SUFFIX
LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION
@@ -378,6 +378,8 @@
AC_CHECK_HEADERS([stdarg.h])
AC_CHECK_HEADERS([sys/stat.h])
AC_CHECK_HEADERS([sys/types.h])
+AC_CHECK_HEADERS([stdint.h])
+AC_CHECK_HEADERS([inttypes.h.h])
AC_CHECK_HEADERS([time.h])
AC_CHECK_HEADERS([ansidecl.h])
AC_CHECK_HEADERS([ieeefp.h])
diff --git a/dict.c b/dict.c
index 20bd310..0e07e8d 100644
--- a/dict.c
+++ b/dict.c
@@ -22,9 +22,13 @@
#include <string.h>
#ifdef HAVE_STDINT_H
#include <stdint.h>
+#else
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
#elif defined(WIN32)
typedef unsigned __int32 uint32_t;
#endif
+#endif
#include <libxml/tree.h>
#include <libxml/dict.h>
#include <libxml/xmlmemory.h>
diff --git a/doc/APIfiles.html b/doc/APIfiles.html
index 479d244..f4ef0e5 100644
--- a/doc/APIfiles.html
+++ b/doc/APIfiles.html
@@ -2797,10 +2797,13 @@
<a href="html/libxml-xmlregexp.html#xmlRegexpIsDeterminist">xmlRegexpIsDeterminist</a><br />
<a href="html/libxml-xmlregexp.html#xmlRegexpPrint">xmlRegexpPrint</a><br />
<a href="html/libxml-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a><br />
-</p><h2><a name="xmlsave" id="xmlsave">Module xmlsave</a>:</h2><p><a href="html/libxml-xmlsave.html#XML_SAVE_FORMAT">XML_SAVE_FORMAT</a><br />
+</p><h2><a name="xmlsave" id="xmlsave">Module xmlsave</a>:</h2><p><a href="html/libxml-xmlsave.html#XML_SAVE_AS_HTML">XML_SAVE_AS_HTML</a><br />
+<a href="html/libxml-xmlsave.html#XML_SAVE_AS_XML">XML_SAVE_AS_XML</a><br />
+<a href="html/libxml-xmlsave.html#XML_SAVE_FORMAT">XML_SAVE_FORMAT</a><br />
<a href="html/libxml-xmlsave.html#XML_SAVE_NO_DECL">XML_SAVE_NO_DECL</a><br />
<a href="html/libxml-xmlsave.html#XML_SAVE_NO_EMPTY">XML_SAVE_NO_EMPTY</a><br />
<a href="html/libxml-xmlsave.html#XML_SAVE_NO_XHTML">XML_SAVE_NO_XHTML</a><br />
+<a href="html/libxml-xmlsave.html#XML_SAVE_XHTML">XML_SAVE_XHTML</a><br />
<a href="html/libxml-xmlsave.html#xmlSaveClose">xmlSaveClose</a><br />
<a href="html/libxml-xmlsave.html#xmlSaveCtxt">xmlSaveCtxt</a><br />
<a href="html/libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a><br />
diff --git a/doc/APIsymbols.html b/doc/APIsymbols.html
index 952abf5..9a1cf8e 100644
--- a/doc/APIsymbols.html
+++ b/doc/APIsymbols.html
@@ -788,6 +788,8 @@
<a href="html/libxml-xmlerror.html#XML_RNGP_VALUE_NO_CONTENT">XML_RNGP_VALUE_NO_CONTENT</a><br />
<a href="html/libxml-xmlerror.html#XML_RNGP_XMLNS_NAME">XML_RNGP_XMLNS_NAME</a><br />
<a href="html/libxml-xmlerror.html#XML_RNGP_XML_NS">XML_RNGP_XML_NS</a><br />
+<a href="html/libxml-xmlsave.html#XML_SAVE_AS_HTML">XML_SAVE_AS_HTML</a><br />
+<a href="html/libxml-xmlsave.html#XML_SAVE_AS_XML">XML_SAVE_AS_XML</a><br />
<a href="html/libxml-xmlerror.html#XML_SAVE_CHAR_INVALID">XML_SAVE_CHAR_INVALID</a><br />
<a href="html/libxml-xmlsave.html#XML_SAVE_FORMAT">XML_SAVE_FORMAT</a><br />
<a href="html/libxml-xmlerror.html#XML_SAVE_NOT_UTF8">XML_SAVE_NOT_UTF8</a><br />
@@ -796,6 +798,7 @@
<a href="html/libxml-xmlsave.html#XML_SAVE_NO_EMPTY">XML_SAVE_NO_EMPTY</a><br />
<a href="html/libxml-xmlsave.html#XML_SAVE_NO_XHTML">XML_SAVE_NO_XHTML</a><br />
<a href="html/libxml-xmlerror.html#XML_SAVE_UNKNOWN_ENCODING">XML_SAVE_UNKNOWN_ENCODING</a><br />
+<a href="html/libxml-xmlsave.html#XML_SAVE_XHTML">XML_SAVE_XHTML</a><br />
<a href="html/libxml-parser.html#XML_SAX2_MAGIC">XML_SAX2_MAGIC</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_AG_PROPS_CORRECT">XML_SCHEMAP_AG_PROPS_CORRECT</a><br />
<a href="html/libxml-xmlerror.html#XML_SCHEMAP_ATTRFORMDEFAULT_VALUE">XML_SCHEMAP_ATTRFORMDEFAULT_VALUE</a><br />
diff --git a/doc/devhelp/libxml2-xmlsave.html b/doc/devhelp/libxml2-xmlsave.html
index cbe12bb..852a906 100644
--- a/doc/devhelp/libxml2-xmlsave.html
+++ b/doc/devhelp/libxml2-xmlsave.html
@@ -78,7 +78,10 @@
<a name="XML_SAVE_FORMAT">XML_SAVE_FORMAT</a> = 1 /* format save output */
<a name="XML_SAVE_NO_DECL">XML_SAVE_NO_DECL</a> = 2 /* drop the xml declaration */
<a name="XML_SAVE_NO_EMPTY">XML_SAVE_NO_EMPTY</a> = 4 /* no empty tags */
- <a name="XML_SAVE_NO_XHTML">XML_SAVE_NO_XHTML</a> = 8 /* disable XHTML1 specific rules */
+ <a name="XML_SAVE_NO_XHTML">XML_SAVE_NO_XHTML</a> = 8 /* disable XHTML1 specific rules */
+ <a name="XML_SAVE_XHTML">XML_SAVE_XHTML</a> = 16 /* force XHTML1 specific rules */
+ <a name="XML_SAVE_AS_XML">XML_SAVE_AS_XML</a> = 32 /* force XML serialization on HTML doc */
+ <a name="XML_SAVE_AS_HTML">XML_SAVE_AS_HTML</a> = 64 /* force HTML serialization on XML doc */
};
</pre><p/>
</div>
diff --git a/doc/devhelp/libxml2.devhelp b/doc/devhelp/libxml2.devhelp
index 1288b18..31a5d91 100644
--- a/doc/devhelp/libxml2.devhelp
+++ b/doc/devhelp/libxml2.devhelp
@@ -969,6 +969,8 @@
<function name="XML_RNGP_VALUE_NO_CONTENT" link="libxml2-xmlerror.html#XML_RNGP_VALUE_NO_CONTENT"/>
<function name="XML_RNGP_XMLNS_NAME" link="libxml2-xmlerror.html#XML_RNGP_XMLNS_NAME"/>
<function name="XML_RNGP_XML_NS" link="libxml2-xmlerror.html#XML_RNGP_XML_NS"/>
+ <function name="XML_SAVE_AS_HTML" link="libxml2-xmlsave.html#XML_SAVE_AS_HTML"/>
+ <function name="XML_SAVE_AS_XML" link="libxml2-xmlsave.html#XML_SAVE_AS_XML"/>
<function name="XML_SAVE_CHAR_INVALID" link="libxml2-xmlerror.html#XML_SAVE_CHAR_INVALID"/>
<function name="XML_SAVE_FORMAT" link="libxml2-xmlsave.html#XML_SAVE_FORMAT"/>
<function name="XML_SAVE_NOT_UTF8" link="libxml2-xmlerror.html#XML_SAVE_NOT_UTF8"/>
@@ -977,6 +979,7 @@
<function name="XML_SAVE_NO_EMPTY" link="libxml2-xmlsave.html#XML_SAVE_NO_EMPTY"/>
<function name="XML_SAVE_NO_XHTML" link="libxml2-xmlsave.html#XML_SAVE_NO_XHTML"/>
<function name="XML_SAVE_UNKNOWN_ENCODING" link="libxml2-xmlerror.html#XML_SAVE_UNKNOWN_ENCODING"/>
+ <function name="XML_SAVE_XHTML" link="libxml2-xmlsave.html#XML_SAVE_XHTML"/>
<function name="XML_SCHEMAP_AG_PROPS_CORRECT" link="libxml2-xmlerror.html#XML_SCHEMAP_AG_PROPS_CORRECT"/>
<function name="XML_SCHEMAP_ATTRFORMDEFAULT_VALUE" link="libxml2-xmlerror.html#XML_SCHEMAP_ATTRFORMDEFAULT_VALUE"/>
<function name="XML_SCHEMAP_ATTRGRP_NONAME_NOREF" link="libxml2-xmlerror.html#XML_SCHEMAP_ATTRGRP_NONAME_NOREF"/>
diff --git a/doc/html/libxml-xmlsave.html b/doc/html/libxml-xmlsave.html
index ec9b5da..8609169 100644
--- a/doc/html/libxml-xmlsave.html
+++ b/doc/html/libxml-xmlsave.html
@@ -32,6 +32,9 @@
<a name="XML_SAVE_NO_DECL" id="XML_SAVE_NO_DECL">XML_SAVE_NO_DECL</a> = 2 : drop the xml declaration
<a name="XML_SAVE_NO_EMPTY" id="XML_SAVE_NO_EMPTY">XML_SAVE_NO_EMPTY</a> = 4 : no empty tags
<a name="XML_SAVE_NO_XHTML" id="XML_SAVE_NO_XHTML">XML_SAVE_NO_XHTML</a> = 8 : disable XHTML1 specific rules
+ <a name="XML_SAVE_XHTML" id="XML_SAVE_XHTML">XML_SAVE_XHTML</a> = 16 : force XHTML1 specific rules
+ <a name="XML_SAVE_AS_XML" id="XML_SAVE_AS_XML">XML_SAVE_AS_XML</a> = 32 : force XML serialization on HTML doc
+ <a name="XML_SAVE_AS_HTML" id="XML_SAVE_AS_HTML">XML_SAVE_AS_HTML</a> = 64 : force HTML serialization on XML doc
}
</pre><h3><a name="xmlSaveClose" id="xmlSaveClose"></a>Function: xmlSaveClose</h3><pre class="programlisting">int xmlSaveClose (<a href="libxml-xmlsave.html#xmlSaveCtxtPtr">xmlSaveCtxtPtr</a> ctxt)<br />
</pre><p>Close a document saving context, i.e. make sure that all bytes have been output and free the associated data.</p>
diff --git a/doc/libxml2-api.xml b/doc/libxml2-api.xml
index 98dc568..b396c3e 100644
--- a/doc/libxml2-api.xml
+++ b/doc/libxml2-api.xml
@@ -2982,9 +2982,12 @@
<summary>the XML document serializer</summary>
<description>API to save document or subtree of document </description>
<author>Daniel Veillard </author>
+ <exports symbol='XML_SAVE_XHTML' type='enum'/>
+ <exports symbol='XML_SAVE_AS_XML' type='enum'/>
<exports symbol='XML_SAVE_NO_EMPTY' type='enum'/>
- <exports symbol='XML_SAVE_NO_DECL' type='enum'/>
<exports symbol='XML_SAVE_NO_XHTML' type='enum'/>
+ <exports symbol='XML_SAVE_NO_DECL' type='enum'/>
+ <exports symbol='XML_SAVE_AS_HTML' type='enum'/>
<exports symbol='XML_SAVE_FORMAT' type='enum'/>
<exports symbol='xmlSaveOption' type='typedef'/>
<exports symbol='xmlSaveCtxt' type='typedef'/>
@@ -5235,14 +5238,17 @@
<enum name='XML_RNGP_VALUE_NO_CONTENT' file='xmlerror' value='1120' type='xmlParserErrors' info='1120'/>
<enum name='XML_RNGP_XMLNS_NAME' file='xmlerror' value='1121' type='xmlParserErrors' info='1121'/>
<enum name='XML_RNGP_XML_NS' file='xmlerror' value='1122' type='xmlParserErrors' info='1122'/>
+ <enum name='XML_SAVE_AS_HTML' file='xmlsave' value='64' type='xmlSaveOption' info=' force HTML serialization on XML doc'/>
+ <enum name='XML_SAVE_AS_XML' file='xmlsave' value='32' type='xmlSaveOption' info='force XML serialization on HTML doc'/>
<enum name='XML_SAVE_CHAR_INVALID' file='xmlerror' value='1401' type='xmlParserErrors' info='1401'/>
<enum name='XML_SAVE_FORMAT' file='xmlsave' value='1' type='xmlSaveOption' info='format save output'/>
<enum name='XML_SAVE_NOT_UTF8' file='xmlerror' value='1400' type='xmlParserErrors'/>
<enum name='XML_SAVE_NO_DECL' file='xmlsave' value='2' type='xmlSaveOption' info='drop the xml declaration'/>
<enum name='XML_SAVE_NO_DOCTYPE' file='xmlerror' value='1402' type='xmlParserErrors' info='1402'/>
<enum name='XML_SAVE_NO_EMPTY' file='xmlsave' value='4' type='xmlSaveOption' info='no empty tags'/>
- <enum name='XML_SAVE_NO_XHTML' file='xmlsave' value='8' type='xmlSaveOption' info=' disable XHTML1 specific rules'/>
+ <enum name='XML_SAVE_NO_XHTML' file='xmlsave' value='8' type='xmlSaveOption' info='disable XHTML1 specific rules'/>
<enum name='XML_SAVE_UNKNOWN_ENCODING' file='xmlerror' value='1403' type='xmlParserErrors' info='1403'/>
+ <enum name='XML_SAVE_XHTML' file='xmlsave' value='16' type='xmlSaveOption' info='force XHTML1 specific rules'/>
<enum name='XML_SCHEMAP_AG_PROPS_CORRECT' file='xmlerror' value='3087' type='xmlParserErrors' info='3086'/>
<enum name='XML_SCHEMAP_ATTRFORMDEFAULT_VALUE' file='xmlerror' value='1701' type='xmlParserErrors' info='1701'/>
<enum name='XML_SCHEMAP_ATTRGRP_NONAME_NOREF' file='xmlerror' value='1702' type='xmlParserErrors' info='1702'/>
diff --git a/doc/libxml2-refs.xml b/doc/libxml2-refs.xml
index 3194516..d5bfd8e 100644
--- a/doc/libxml2-refs.xml
+++ b/doc/libxml2-refs.xml
@@ -782,6 +782,8 @@
<reference name='XML_RNGP_VALUE_NO_CONTENT' href='html/libxml-xmlerror.html#XML_RNGP_VALUE_NO_CONTENT'/>
<reference name='XML_RNGP_XMLNS_NAME' href='html/libxml-xmlerror.html#XML_RNGP_XMLNS_NAME'/>
<reference name='XML_RNGP_XML_NS' href='html/libxml-xmlerror.html#XML_RNGP_XML_NS'/>
+ <reference name='XML_SAVE_AS_HTML' href='html/libxml-xmlsave.html#XML_SAVE_AS_HTML'/>
+ <reference name='XML_SAVE_AS_XML' href='html/libxml-xmlsave.html#XML_SAVE_AS_XML'/>
<reference name='XML_SAVE_CHAR_INVALID' href='html/libxml-xmlerror.html#XML_SAVE_CHAR_INVALID'/>
<reference name='XML_SAVE_FORMAT' href='html/libxml-xmlsave.html#XML_SAVE_FORMAT'/>
<reference name='XML_SAVE_NOT_UTF8' href='html/libxml-xmlerror.html#XML_SAVE_NOT_UTF8'/>
@@ -790,6 +792,7 @@
<reference name='XML_SAVE_NO_EMPTY' href='html/libxml-xmlsave.html#XML_SAVE_NO_EMPTY'/>
<reference name='XML_SAVE_NO_XHTML' href='html/libxml-xmlsave.html#XML_SAVE_NO_XHTML'/>
<reference name='XML_SAVE_UNKNOWN_ENCODING' href='html/libxml-xmlerror.html#XML_SAVE_UNKNOWN_ENCODING'/>
+ <reference name='XML_SAVE_XHTML' href='html/libxml-xmlsave.html#XML_SAVE_XHTML'/>
<reference name='XML_SAX2_MAGIC' href='html/libxml-parser.html#XML_SAX2_MAGIC'/>
<reference name='XML_SCHEMAP_AG_PROPS_CORRECT' href='html/libxml-xmlerror.html#XML_SCHEMAP_AG_PROPS_CORRECT'/>
<reference name='XML_SCHEMAP_ATTRFORMDEFAULT_VALUE' href='html/libxml-xmlerror.html#XML_SCHEMAP_ATTRFORMDEFAULT_VALUE'/>
@@ -4319,6 +4322,8 @@
<ref name='XML_RNGP_VALUE_NO_CONTENT'/>
<ref name='XML_RNGP_XMLNS_NAME'/>
<ref name='XML_RNGP_XML_NS'/>
+ <ref name='XML_SAVE_AS_HTML'/>
+ <ref name='XML_SAVE_AS_XML'/>
<ref name='XML_SAVE_CHAR_INVALID'/>
<ref name='XML_SAVE_FORMAT'/>
<ref name='XML_SAVE_NOT_UTF8'/>
@@ -4327,6 +4332,7 @@
<ref name='XML_SAVE_NO_EMPTY'/>
<ref name='XML_SAVE_NO_XHTML'/>
<ref name='XML_SAVE_UNKNOWN_ENCODING'/>
+ <ref name='XML_SAVE_XHTML'/>
<ref name='XML_SAX2_MAGIC'/>
<ref name='XML_SCHEMAP_AG_PROPS_CORRECT'/>
<ref name='XML_SCHEMAP_ATTRFORMDEFAULT_VALUE'/>
@@ -13414,10 +13420,13 @@
<ref name='xmlRegexpPtr'/>
</file>
<file name='xmlsave'>
+ <ref name='XML_SAVE_AS_HTML'/>
+ <ref name='XML_SAVE_AS_XML'/>
<ref name='XML_SAVE_FORMAT'/>
<ref name='XML_SAVE_NO_DECL'/>
<ref name='XML_SAVE_NO_EMPTY'/>
<ref name='XML_SAVE_NO_XHTML'/>
+ <ref name='XML_SAVE_XHTML'/>
<ref name='xmlSaveClose'/>
<ref name='xmlSaveCtxt'/>
<ref name='xmlSaveCtxtPtr'/>
diff --git a/doc/libxml2.xsa b/doc/libxml2.xsa
index bcb3a0e..5a673bb 100644
--- a/doc/libxml2.xsa
+++ b/doc/libxml2.xsa
@@ -8,33 +8,14 @@
</vendor>
<product id="libxml2">
<name>libxml2</name>
- <version>2.7.0</version>
- <last-release> Aug 30 2008</last-release>
+ <version>2.7.1</version>
+ <last-release> Sep 1 2008</last-release>
<info-url>http://xmlsoft.org/</info-url>
- <changes> - Documentation: switch ChangeLog to UTF-8, improve mutithreads and
- xmlParserCleanup docs
- - Portability fixes: Older Win32 platforms (Rob Richards), MSVC
- porting fix (Rob Richards), Mac OS X regression tests (Sven Herzberg),
- non GNUCC builds (Rob Richards), compilation on Haiku (Andreas Färber)
-
- - Bug fixes: various realloc problems (Ashwin), potential double-free
- (Ashwin), regexp crash, icrash with invalid whitespace facets (Rob
- Richards), pattern fix when streaming (William Brack), various XML
- parsing and validation fixes based on the W3C regression tests, reader
- tree skipping function fix (Ashwin), Schemas regexps escaping fix
- (Volker Grabsch), handling of entity push errors (Ashwin), fix a slowdown
- when encoder cant serialize characters on output
- - Code cleanup: compilation fix without the reader, without the output
- (Robert Schwebel), python whitespace (Martin), many space/tabs cleanups,
- serious cleanup of the entity handling code
- - Improvement: switch parser to XML-1.0 5th edition, add parsing flags
- for old versions, switch URI parsing to RFC 3986,
- add xmlSchemaValidCtxtGetParserCtxt (Holger Kaelberer),
- new hashing functions for dictionnaries (based on Stefan Behnel work),
- improve handling of misplaced html/head/body in HTML parser, better
- regression test tools and code coverage display, better algorithms
- to detect various versions of the billion laughts attacks, make
- arbitrary parser limits avoidable as a parser option
+ <changes> - Portability fix: Borland C fix (Moritz Both)
+ - Bug fixes: python serialization wrappers, XPath QName corner
+ case handking and leaks (Martin)
+ - Improvement: extend the xmlSave to handle HTML documents and trees
+ - Cleanup: python serialization wrappers
</changes>
</product>
diff --git a/doc/news.html b/doc/news.html
index d9dd809..31a0cf0 100644
--- a/doc/news.html
+++ b/doc/news.html
@@ -12,7 +12,14 @@
<li>Finishing up <a href="http://www.w3.org/TR/xmlschema-1/">XML
Schemas</a></li>
</ul><p>The <a href="ChangeLog.html">change log</a> describes the recents commits
-to the <a href="http://svn.gnome.org/viewcvs/libxml2/trunk/">SVN</a> code base.</p><p>Here is the list of public releases:</p><h3>2.7.1: Sep 1 2008</h3><ul><li>Portability fix: Borland C fix (Moritz Both)</li>
+to the <a href="http://svn.gnome.org/viewcvs/libxml2/trunk/">SVN</a> code base.</p><p>Here is the list of public releases:</p><h3>2.7.2: Oct 3 2008</h3><ul><li>Portability fix: fix solaris compilation problem, fix compilation
+ if XPath is not configured in</li>
+ <li>Bug fixes: nasty entity bug introduced in 2.7.0, restore old behaviour
+ when saving an HTML doc with an xml dump function, HTML UTF-8 parsing
+ bug, fix reader custom error handlers (Riccardo Scussat)
+ </li><li>Improvement: xmlSave options for more flexibility to save as
+ XML/HTML/XHTML, handle leading BOM in HTML documents</li>
+</ul><h3>2.7.1: Sep 1 2008</h3><ul><li>Portability fix: Borland C fix (Moritz Both)</li>
<li>Bug fixes: python serialization wrappers, XPath QName corner
case handking and leaks (Martin)</li>
<li>Improvement: extend the xmlSave to handle HTML documents and trees</li>
diff --git a/doc/xml.html b/doc/xml.html
index 9117958..b443229 100644
--- a/doc/xml.html
+++ b/doc/xml.html
@@ -727,6 +727,17 @@
<p>Here is the list of public releases:</p>
+<h3>2.7.2: Oct 3 2008</h3>
+<ul>
+ <li>Portability fix: fix solaris compilation problem, fix compilation
+ if XPath is not configured in</li>
+ <li>Bug fixes: nasty entity bug introduced in 2.7.0, restore old behaviour
+ when saving an HTML doc with an xml dump function, HTML UTF-8 parsing
+ bug, fix reader custom error handlers (Riccardo Scussat)
+ <li>Improvement: xmlSave options for more flexibility to save as
+ XML/HTML/XHTML, handle leading BOM in HTML documents</li>
+</ul>
+
<h3>2.7.1: Sep 1 2008</h3>
<ul>
<li>Portability fix: Borland C fix (Moritz Both)</li>
diff --git a/parser.c b/parser.c
index fe4e6a0..4b7b758 100644
--- a/parser.c
+++ b/parser.c
@@ -7215,6 +7215,7 @@
}
if (*ptr != ';') {
xmlFatalErr(ctxt, XML_ERR_ENTITYREF_SEMICOL_MISSING, NULL);
+ xmlFree(name);
*str = ptr;
return(NULL);
}
@@ -7226,6 +7227,7 @@
*/
ent = xmlGetPredefinedEntity(name);
if (ent != NULL) {
+ xmlFree(name);
*str = ptr;
return(ent);
}
diff --git a/python/setup.py b/python/setup.py
index 75b3a40..50585c8 100755
--- a/python/setup.py
+++ b/python/setup.py
@@ -226,7 +226,7 @@
setup (name = "libxml2-python",
# On *nix, the version number is created from setup.py.in
# On windows, it is set by configure.js
- version = "2.7.1",
+ version = "2.7.2",
description = descr,
author = "Daniel Veillard",
author_email = "veillard@redhat.com",
diff --git a/result/ent13 b/result/ent13
new file mode 100644
index 0000000..8dd96c9
--- /dev/null
+++ b/result/ent13
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<!DOCTYPE test [
+<!ENTITY ampproblem "&">
+]>
+<t a="&problem;">a</t>
diff --git a/result/ent13.rde b/result/ent13.rde
new file mode 100644
index 0000000..d9227fc
--- /dev/null
+++ b/result/ent13.rde
@@ -0,0 +1,4 @@
+0 10 test 0 0
+0 1 t 0 0
+1 3 #text 0 1 a
+0 15 t 0 0
diff --git a/result/ent13.rdr b/result/ent13.rdr
new file mode 100644
index 0000000..d9227fc
--- /dev/null
+++ b/result/ent13.rdr
@@ -0,0 +1,4 @@
+0 10 test 0 0
+0 1 t 0 0
+1 3 #text 0 1 a
+0 15 t 0 0
diff --git a/result/ent13.sax b/result/ent13.sax
new file mode 100644
index 0000000..5e4bb44
--- /dev/null
+++ b/result/ent13.sax
@@ -0,0 +1,11 @@
+SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.internalSubset(test, , )
+SAX.entityDecl(ampproblem, 1, (null), (null), &)
+SAX.getEntity(ampproblem)
+SAX.externalSubset(test, , )
+SAX.getEntity(ampproblem)
+SAX.startElement(t, a='&problem;')
+SAX.characters(a, 1)
+SAX.endElement(t)
+SAX.endDocument()
diff --git a/result/ent13.sax2 b/result/ent13.sax2
new file mode 100644
index 0000000..3414da6
--- /dev/null
+++ b/result/ent13.sax2
@@ -0,0 +1,11 @@
+SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.internalSubset(test, , )
+SAX.entityDecl(ampproblem, 1, (null), (null), &)
+SAX.getEntity(ampproblem)
+SAX.externalSubset(test, , )
+SAX.getEntity(ampproblem)
+SAX.startElementNs(t, NULL, NULL, 0, 1, 0, a='&...', 12)
+SAX.characters(a, 1)
+SAX.endElementNs(t, NULL, NULL)
+SAX.endDocument()
diff --git a/result/noent/ent13 b/result/noent/ent13
new file mode 100644
index 0000000..02bc069
--- /dev/null
+++ b/result/noent/ent13
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<!DOCTYPE test [
+<!ENTITY ampproblem "&">
+]>
+<t a="&">a</t>
diff --git a/test/ent13 b/test/ent13
new file mode 100644
index 0000000..f5ebd89
--- /dev/null
+++ b/test/ent13
@@ -0,0 +1,6 @@
+<?xml version='1.0' ?>
+<!DOCTYPE test [
+<!ENTITY ampproblem '&'>
+]>
+<t a="&problem;">a</t>
+