SAX2: Ignore namespaces in HTML documents

In commit 21ca8829, we started to ignore namespaces in HTML element
names but we still called xmlSplitQName, effectively stripping the
namespace prefix. This would cause elements like <o:p> being parsed
as <p>. Now we leave the name untouched.

Fixes #508.
diff --git a/SAX2.c b/SAX2.c
index b3dd89b..4b09fa6 100644
--- a/SAX2.c
+++ b/SAX2.c
@@ -1632,12 +1632,15 @@
 	ctxt->validate = 0;
     }
 
-
-    /*
-     * Split the full name into a namespace prefix and the tag name
-     */
-    name = xmlSplitQName(ctxt, fullname, &prefix);
-
+    if (ctxt->html) {
+        prefix = NULL;
+        name = xmlStrdup(fullname);
+    } else {
+        /*
+         * Split the full name into a namespace prefix and the tag name
+         */
+        name = xmlSplitQName(ctxt, fullname, &prefix);
+    }
 
     /*
      * Note : the namespace resolution is deferred until the end of the
diff --git a/result/HTML/names.html b/result/HTML/names.html
new file mode 100644
index 0000000..dd7dcc2
--- /dev/null
+++ b/result/HTML/names.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+<body>
+  <o:p></o:p>
+</body>
+</html>
diff --git a/result/HTML/names.html.err b/result/HTML/names.html.err
new file mode 100644
index 0000000..4d91a5d
--- /dev/null
+++ b/result/HTML/names.html.err
@@ -0,0 +1,3 @@
+./test/HTML/names.html:3: HTML parser error : Tag o:p invalid
+  <o:p></o:p>
+      ^
diff --git a/result/HTML/names.html.sax b/result/HTML/names.html.sax
new file mode 100644
index 0000000..12a107f
--- /dev/null
+++ b/result/HTML/names.html.sax
@@ -0,0 +1,20 @@
+SAX.setDocumentLocator()
+SAX.startDocument()
+SAX.startElement(html)
+SAX.characters(
+, 1)
+SAX.startElement(body)
+SAX.characters(
+  , 3)
+SAX.startElement(o:p)
+SAX.error: Tag o:p invalid
+SAX.endElement(o:p)
+SAX.characters(
+, 1)
+SAX.endElement(body)
+SAX.characters(
+, 1)
+SAX.endElement(html)
+SAX.characters(
+, 1)
+SAX.endDocument()
diff --git a/test/HTML/names.html b/test/HTML/names.html
new file mode 100644
index 0000000..0dac7a4
--- /dev/null
+++ b/test/HTML/names.html
@@ -0,0 +1,5 @@
+<html>
+<body>
+  <o:p></o:p>
+</body>
+</html>