summaryrefslogtreecommitdiff
path: root/HTMLparser.c
diff options
context:
space:
mode:
authorMike Hommey <mh@glandium.org>2004-09-10 05:26:00 +0000
committerMike Hommey <mh@glandium.org>2004-09-10 05:26:00 +0000
commit09deb06614c3408ec0816a3c88920138bae2083c (patch)
treea1b841a7dc28eecb98ca361c9371ecd1449a1908 /HTMLparser.c
parentc14c53a3645d81281058d4bb4cff24fa8d6faf33 (diff)
downloadlibxml2-09deb06614c3408ec0816a3c88920138bae2083c.tar.gz
Load /tmp/tmp.BmUFjT/libxml2-2.6.13 intoupstream/2.6.13
packages/libxml2/branches/upstream/current.
Diffstat (limited to 'HTMLparser.c')
-rw-r--r--HTMLparser.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/HTMLparser.c b/HTMLparser.c
index 2e7984d..309d93c 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -2091,6 +2091,7 @@ htmlNewDocNoDtD(const xmlChar *URI, const xmlChar *ExternalID) {
cur->ids = NULL;
cur->refs = NULL;
cur->_private = NULL;
+ cur->charset = XML_CHAR_ENCODING_UTF8;
if ((ExternalID != NULL) ||
(URI != NULL))
xmlCreateIntSubset(cur, BAD_CAST "html", ExternalID, URI);
@@ -5647,6 +5648,8 @@ htmlReadMemory(const char *buffer, int size, const char *URL, const char *encodi
ctxt = xmlCreateMemoryParserCtxt(buffer, size);
if (ctxt == NULL)
return (NULL);
+ if (ctxt->sax != NULL)
+ memcpy(ctxt->sax, &htmlDefaultSAXHandler, sizeof(xmlSAXHandlerV1));
return (htmlDoRead(ctxt, URL, encoding, options, 0));
}