diff options
author | Andreas Kling <kling@serenityos.org> | 2022-04-06 14:47:06 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-04-06 19:35:07 +0200 |
commit | 0eae88f6134f84033a9e5c51fe89cb6b69f1f773 (patch) | |
tree | b6d527532c874cc7db518702f27e0691cbdcc73a /Userland/Libraries/LibWeb | |
parent | 35934acbd3316ed5025cb0b46492ab9fc1955a29 (diff) | |
download | serenity-0eae88f6134f84033a9e5c51fe89cb6b69f1f773.zip |
LibWeb: Use FrameLoader::load_html() when loading error pages
Use our existing helper function for parsing a HTML string and opening
it as the main content of the attached browsing context.
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r-- | Userland/Libraries/LibWeb/Loader/FrameLoader.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp index e690c83155..62e2004a24 100644 --- a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp +++ b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp @@ -256,9 +256,7 @@ void FrameLoader::load_error_page(const AK::URL& failed_url, String const& error generator.set("failed_url", escape_html_entities(failed_url.to_string())); generator.set("error", escape_html_entities(error)); generator.append(data); - auto document = HTML::parse_html_document(generator.as_string_view(), failed_url, "utf-8"); - VERIFY(document); - browsing_context().set_active_document(document); + load_html(generator.as_string_view(), failed_url); }, [](auto& error, auto) { dbgln("Failed to load error page: {}", error); |