fixing bug #319964, parsing of HTML attribute really should not have
* SAX2.c: fixing bug #319964, parsing of HTML attribute really
should not have namespace processing.
Daniel
svn path=/trunk/; revision=3637
diff --git a/ChangeLog b/ChangeLog
index da08616..8bfc2cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Jun 12 17:14:08 CEST 2007 Daniel Veillard <daniel@veillard.com>
+
+ * SAX2.c: fixing bug #319964, parsing of HTML attribute really
+ should not have namespace processing.
+
Tue Jun 12 16:42:14 CEST 2007 Daniel Veillard <daniel@veillard.com>
* parser.c: fixed the push mode when a big comment occurs before
diff --git a/SAX2.c b/SAX2.c
index 7d4ab64..9739831 100644
--- a/SAX2.c
+++ b/SAX2.c
@@ -1059,25 +1059,31 @@
xmlChar *nval;
xmlNsPtr namespace;
- /*
- * Split the full name into a namespace prefix and the tag name
- */
- name = xmlSplitQName(ctxt, fullname, &ns);
- if ((name != NULL) && (name[0] == 0)) {
- if (xmlStrEqual(ns, BAD_CAST "xmlns")) {
- xmlNsErrMsg(ctxt, XML_ERR_NS_DECL_ERROR,
- "invalid namespace declaration '%s'\n",
- fullname, NULL);
- } else {
- xmlNsWarnMsg(ctxt, XML_WAR_NS_COLUMN,
- "Avoid attribute ending with ':' like '%s'\n",
- fullname, NULL);
- }
- if (ns != NULL)
- xmlFree(ns);
- ns = NULL;
- xmlFree(name);
+ if (ctxt->html) {
name = xmlStrdup(fullname);
+ ns = NULL;
+ namespace = NULL;
+ } else {
+ /*
+ * Split the full name into a namespace prefix and the tag name
+ */
+ name = xmlSplitQName(ctxt, fullname, &ns);
+ if ((name != NULL) && (name[0] == 0)) {
+ if (xmlStrEqual(ns, BAD_CAST "xmlns")) {
+ xmlNsErrMsg(ctxt, XML_ERR_NS_DECL_ERROR,
+ "invalid namespace declaration '%s'\n",
+ fullname, NULL);
+ } else {
+ xmlNsWarnMsg(ctxt, XML_WAR_NS_COLUMN,
+ "Avoid attribute ending with ':' like '%s'\n",
+ fullname, NULL);
+ }
+ if (ns != NULL)
+ xmlFree(ns);
+ ns = NULL;
+ xmlFree(name);
+ name = xmlStrdup(fullname);
+ }
}
if (name == NULL) {
xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElement");