mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 11:05:09 +00:00
LibWeb: Plumb content encoding into the new HTML parser
We still don't handle non-ASCII input correctly, but at least now we'll convert e.g ISO-8859-1 to UTF-8 before starting to tokenize. This patch also makes "view source" work with the new parser. :^)
This commit is contained in:
parent
772b51038e
commit
5e53c45113
6 changed files with 18 additions and 9 deletions
|
@ -444,7 +444,7 @@ RefPtr<Document> HtmlView::create_document_from_mime_type(const ByteBuffer& data
|
|||
return create_gemini_document(data, url);
|
||||
if (mime_type == "text/html") {
|
||||
if (m_use_new_parser) {
|
||||
HTMLDocumentParser parser(data);
|
||||
HTMLDocumentParser parser(data, encoding);
|
||||
parser.run(url);
|
||||
return parser.document();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue