diff --git a/src/ecmascript/ecmascript.cpp b/src/ecmascript/ecmascript.cpp index 54f24253c..0140121a9 100644 --- a/src/ecmascript/ecmascript.cpp +++ b/src/ecmascript/ecmascript.cpp @@ -803,7 +803,7 @@ document_parse(struct document *document) add_bytes_to_string(&str, f->data, f->length); // Parse HTML and create a DOM tree - xmlDoc* doc = htmlReadDoc((xmlChar*)str.source, NULL, get_cp_mime_name(document->cp), + xmlDoc* doc = htmlReadDoc((xmlChar*)str.source, NULL, NULL, HTML_PARSE_RECOVER | HTML_PARSE_NOERROR | HTML_PARSE_NOWARNING); // Encapsulate raw libxml document in a libxml++ wrapper xmlpp::Document *docu = new xmlpp::Document(doc); diff --git a/src/protocol/common.c b/src/protocol/common.c index 39dbad4a4..dde9292df 100644 --- a/src/protocol/common.c +++ b/src/protocol/common.c @@ -18,6 +18,7 @@ #include "elinks.h" #include "config/options.h" +#include "intl/charsets.h" #include "osdep/osdep.h" #include "protocol/common.h" #include "protocol/protocol.h" @@ -51,6 +52,7 @@ init_directory_listing(struct string *page, struct uri *uri) struct string location = NULL_STRING; const char *info; int local = (uri->protocol == PROTOCOL_FILE); + char *charset = straconcat("", (char *) NULL); if (!init_string(page) || !init_string(&dirpath) @@ -73,7 +75,13 @@ init_directory_listing(struct string *page, struct uri *uri) if (!local && !add_char_to_string(&location, '/')) goto out_of_memory; - if (!add_to_string(page, "\n