From b6b0fd8962e95bdb27e9e65bc785ce8cf1a3622c Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Mon, 22 Oct 2001 12:31:11 +0000 Subject: [PATCH] Fixed a bug when creating a new HTML document, doc->children was set to NULL with a DTD child Daniel --- ChangeLog | 4 ++++ HTMLparser.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 50139f66..d4d97f4c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Mon Oct 22 14:20:17 CEST 2001 Daniel Veillard + + * HTMLparser.c: fixed a bug in htmlNewDoc() + Mon Oct 22 11:32:36 CEST 2001 Daniel Veillard * test/threads/*: added entities testing to the Thread test diff --git a/HTMLparser.c b/HTMLparser.c index 6b69b206..428248ed 100644 --- a/HTMLparser.c +++ b/HTMLparser.c @@ -1810,9 +1810,6 @@ htmlNewDocNoDtD(const xmlChar *URI, const xmlChar *ExternalID) { cur->type = XML_HTML_DOCUMENT_NODE; cur->version = NULL; cur->intSubset = NULL; - if ((ExternalID != NULL) || - (URI != NULL)) - xmlCreateIntSubset(cur, BAD_CAST "HTML", ExternalID, URI); cur->doc = cur; cur->name = NULL; cur->children = NULL; @@ -1824,6 +1821,9 @@ htmlNewDocNoDtD(const xmlChar *URI, const xmlChar *ExternalID) { cur->ids = NULL; cur->refs = NULL; cur->_private = NULL; + if ((ExternalID != NULL) || + (URI != NULL)) + xmlCreateIntSubset(cur, BAD_CAST "html", ExternalID, URI); return(cur); }