fixed teh 2 stupid bugs affecting htmlReadDoc() and htmlReadIO() this

* HTMLparser.c: fixed teh 2 stupid bugs affecting htmlReadDoc() and
  htmlReadIO() this should fix #340322
Daniel
diff --git a/HTMLparser.c b/HTMLparser.c
index 5555766..aac2a78 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -4347,7 +4347,8 @@
  * Returns the new parser context or NULL
  */
 static htmlParserCtxtPtr
-htmlCreateDocParserCtxt(xmlChar *cur, const char *encoding ATTRIBUTE_UNUSED) {
+htmlCreateDocParserCtxt(const xmlChar *cur,
+                        const char *encoding ATTRIBUTE_UNUSED) {
     int len;
     htmlParserCtxtPtr ctxt;
 
@@ -5936,7 +5937,7 @@
         return (NULL);
 
     xmlInitParser();
-    ctxt = xmlCreateDocParserCtxt(cur);
+    ctxt = htmlCreateDocParserCtxt(cur, NULL);
     if (ctxt == NULL)
         return (NULL);
     return (htmlDoRead(ctxt, URL, encoding, options, 0));
@@ -6060,7 +6061,7 @@
                                          XML_CHAR_ENCODING_NONE);
     if (input == NULL)
         return (NULL);
-    ctxt = xmlNewParserCtxt();
+    ctxt = htmlNewParserCtxt();
     if (ctxt == NULL) {
         xmlFreeParserInputBuffer(input);
         return (NULL);