diff --git a/src/document/document.cpp b/src/document/document.cpp index 4b007a70e..77047414d 100644 --- a/src/document/document.cpp +++ b/src/document/document.cpp @@ -178,6 +178,10 @@ init_document(struct cache_entry *cached, struct document_options *options) init_list(document->tags); init_list(document->nodes); +#ifdef CONFIG_LIBDOM + init_string(&document->text); +#endif + #ifdef CONFIG_ECMASCRIPT init_list(document->onload_snippets); init_list(document->timeouts); diff --git a/src/document/libdom/renderer2.c b/src/document/libdom/renderer2.c index 3e3937455..5b151be1a 100644 --- a/src/document/libdom/renderer2.c +++ b/src/document/libdom/renderer2.c @@ -20,6 +20,7 @@ #include "document/libdom/mapa.h" #include "document/libdom/renderer2.h" #include "ecmascript/libdom/parse.h" +#include "util/string.h" static int in_script = 0;