Skip to content

Commit

Permalink
LibWeb: Fix HTML injection on FrameLoader error page
Browse files Browse the repository at this point in the history
Small regression introduced by 3857148, we still have to escape HTML
entities.
  • Loading branch information
linusg committed Apr 22, 2021
1 parent 696f23d commit 024fd9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Userland/Libraries/LibWeb/Loader/FrameLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ void FrameLoader::load_error_page(const URL& failed_url, const String& error)
VERIFY(!data.is_null());
StringBuilder builder;
SourceGenerator generator { builder };
generator.set("failed_url", failed_url.to_string());
generator.set("error", 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);
Expand Down

0 comments on commit 024fd9b

Please sign in to comment.