mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 05:35:06 +00:00
LibWeb: Set the encoding of HTML documents
Now that we attach the document to the frame before parsing, we have to make sure we set the encoding on the document before parsing, or things may not turn out well.
This commit is contained in:
parent
024059b49b
commit
7b735b55e1
2 changed files with 3 additions and 2 deletions
|
@ -260,6 +260,7 @@ void FrameLoader::resource_did_load()
|
|||
|
||||
auto document = DOM::Document::create();
|
||||
document->set_url(url);
|
||||
document->set_encoding(resource()->encoding());
|
||||
document->set_content_type(resource()->mime_type());
|
||||
|
||||
frame().set_document(document);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue