Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix to avoid a crash when dumping an attribute from an XHTML document,

* xmlsave.c: fix to avoid a crash when dumping an attribute from
  an XHTML document, patch contributed to fix #485298
Daniel

svn path=/trunk/; revision=3660
  • Loading branch information...
commit a76a81f63826a65b2cb0fefb7265c5ae97aadde3 1 parent 8e6f0fc
Daniel Veillard authored
5 ChangeLog
View
@@ -1,3 +1,8 @@
+Wed Oct 10 10:25:52 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * xmlsave.c: fix to avoid a crash when dumping an attribute from
+ an XHTML document, patch contributed to fix #485298
+
Tue Aug 28 19:32:28 CEST 2007 Daniel Veillard <daniel@veillard.com>
* xmlregexp.c: another nasty regexp case fixed.
2  doc/devhelp/libxml2-valid.html
View
@@ -101,6 +101,7 @@
<a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> <a href="#xmlCopyDocElementContent">xmlCopyDocElementContent</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> cur);
<a href="libxml2-tree.html#xmlIDPtr">xmlIDPtr</a> <a href="#xmlAddID">xmlAddID</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr);
void <a href="#xmlFreeRefTable">xmlFreeRefTable</a> (<a href="libxml2-valid.html#xmlRefTablePtr">xmlRefTablePtr</a> table);
+int <a href="#xmlValidateNamesValue">xmlValidateNamesValue</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
int <a href="#xmlRemoveID">xmlRemoveID</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr);
void <a href="#xmlFreeElementTable">xmlFreeElementTable</a> (<a href="libxml2-valid.html#xmlElementTablePtr">xmlElementTablePtr</a> table);
void <a href="#xmlFreeIDTable">xmlFreeIDTable</a> (<a href="libxml2-valid.html#xmlIDTablePtr">xmlIDTablePtr</a> table);
@@ -112,7 +113,6 @@
typedef void <a href="#xmlValidityWarningFunc">xmlValidityWarningFunc</a> (void * ctx, <br/> const char * msg, <br/> ... ...);
int <a href="#xmlValidatePopElement">xmlValidatePopElement</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * qname);
void <a href="#xmlFreeEnumeration">xmlFreeEnumeration</a> (<a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> cur);
-int <a href="#xmlValidateNamesValue">xmlValidateNamesValue</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value);
<a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> <a href="#xmlCopyEnumeration">xmlCopyEnumeration</a> (<a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> cur);
<a href="libxml2-tree.html#xmlAttributePtr">xmlAttributePtr</a> <a href="#xmlGetDtdAttrDesc">xmlGetDtdAttrDesc</a> (<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * elem, <br/> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name);
int <a href="#xmlValidateDtd">xmlValidateDtd</a> (<a href="libxml2-valid.html#xmlValidCtxtPtr">xmlValidCtxtPtr</a> ctxt, <br/> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br/> <a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd);
10 doc/libxml2-api.xml
View
@@ -1211,13 +1211,13 @@
<exports symbol='XML_SCHEMA_TYPE_SIMPLE' type='enum'/>
<exports symbol='XML_SCHEMAS_NCNAME' type='enum'/>
<exports symbol='XML_SCHEMAS_LONG' type='enum'/>
- <exports symbol='XML_SCHEMA_FACET_FRACTIONDIGITS' type='enum'/>
+ <exports symbol='XML_SCHEMA_TYPE_ANY_ATTRIBUTE' type='enum'/>
<exports symbol='XML_SCHEMAS_BOOLEAN' type='enum'/>
<exports symbol='XML_SCHEMAS_ENTITY' type='enum'/>
<exports symbol='XML_SCHEMA_TYPE_GROUP' type='enum'/>
<exports symbol='XML_SCHEMAS_GYEARMONTH' type='enum'/>
<exports symbol='XML_SCHEMAS_BASE64BINARY' type='enum'/>
- <exports symbol='XML_SCHEMA_TYPE_ANY_ATTRIBUTE' type='enum'/>
+ <exports symbol='XML_SCHEMA_FACET_FRACTIONDIGITS' type='enum'/>
<exports symbol='XML_SCHEMA_FACET_WHITESPACE' type='enum'/>
<exports symbol='XML_SCHEMAS_IDREF' type='enum'/>
<exports symbol='XML_SCHEMA_TYPE_ATTRIBUTE' type='enum'/>
@@ -1744,6 +1744,7 @@
<exports symbol='xmlCopyDocElementContent' type='function'/>
<exports symbol='xmlAddID' type='function'/>
<exports symbol='xmlFreeRefTable' type='function'/>
+ <exports symbol='xmlValidateNamesValue' type='function'/>
<exports symbol='xmlRemoveID' type='function'/>
<exports symbol='xmlFreeElementTable' type='function'/>
<exports symbol='xmlFreeIDTable' type='function'/>
@@ -1755,7 +1756,6 @@
<exports symbol='xmlValidityWarningFunc' type='function'/>
<exports symbol='xmlValidatePopElement' type='function'/>
<exports symbol='xmlFreeEnumeration' type='function'/>
- <exports symbol='xmlValidateNamesValue' type='function'/>
<exports symbol='xmlCopyEnumeration' type='function'/>
<exports symbol='xmlGetDtdAttrDesc' type='function'/>
<exports symbol='xmlValidateDtd' type='function'/>
@@ -3452,15 +3452,15 @@
<exports symbol='XPATH_ENCODING_ERROR' type='enum'/>
<exports symbol='XPTR_RESOURCE_ERROR' type='enum'/>
<exports symbol='XPATH_NUMBER' type='enum'/>
- <exports symbol='XPATH_INVALID_CTXT_SIZE' type='enum'/>
+ <exports symbol='XPATH_POINT' type='enum'/>
<exports symbol='XPATH_USERS' type='enum'/>
<exports symbol='XPATH_UNDEF_PREFIX_ERROR' type='enum'/>
<exports symbol='XPATH_UNKNOWN_FUNC_ERROR' type='enum'/>
+ <exports symbol='XPATH_INVALID_CTXT_SIZE' type='enum'/>
<exports symbol='XPATH_RANGE' type='enum'/>
<exports symbol='XPTR_SYNTAX_ERROR' type='enum'/>
<exports symbol='XPATH_LOCATIONSET' type='enum'/>
<exports symbol='XPATH_INVALID_CTXT' type='enum'/>
- <exports symbol='XPATH_POINT' type='enum'/>
<exports symbol='XPATH_INVALID_ARITY' type='enum'/>
<exports symbol='XPATH_STRING' type='enum'/>
<exports symbol='XPATH_INVALID_PREDICATE_ERROR' type='enum'/>
4 xmlsave.c
View
@@ -1254,6 +1254,10 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
}
return;
}
+ if (cur->type == XML_ATTRIBUTE_NODE) {
+ xmlAttrDumpOutput(ctxt, (xmlAttrPtr) cur);
+ return;
+ }
format = ctxt->format;
if (format == 1) {
Please sign in to comment.
Something went wrong with that request. Please try again.