mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 17:04:59 +00:00
LibWeb: Use standardized encoding names, add encoding attribute to document
This commit is contained in:
parent
f3d2053bff
commit
ed2689c00a
5 changed files with 20 additions and 5 deletions
|
@ -135,9 +135,7 @@ RefPtr<DOM::Document> FrameLoader::create_document_from_mime_type(const ByteBuff
|
|||
RefPtr<DOM::Document> document;
|
||||
|
||||
if (mime_type == "text/html" || mime_type == "image/svg+xml") {
|
||||
HTML::HTMLDocumentParser parser(data, encoding);
|
||||
parser.run(url);
|
||||
document = parser.document();
|
||||
document = HTML::parse_html_document(data, url, encoding);
|
||||
} else if (mime_type.starts_with("image/")) {
|
||||
document = create_image_document(data, url);
|
||||
} else if (mime_type == "text/plain") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue