From 09deb06614c3408ec0816a3c88920138bae2083c Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Fri, 10 Sep 2004 05:26:00 +0000 Subject: Load /tmp/tmp.BmUFjT/libxml2-2.6.13 into packages/libxml2/branches/upstream/current. --- HTMLparser.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'HTMLparser.c') 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)); } -- cgit v1.2.3