summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Loader
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-04-21 23:35:24 +0200
committerAndreas Kling <kling@serenityos.org>2021-04-21 23:49:02 +0200
commit9a8dd38493f7860f2b0485dc9edca01e97230803 (patch)
treebbdb2a5ee0468ecc7c4332ffeb148bec02e0359e /Userland/Libraries/LibWeb/Loader
parente924da6c739cda065975b3b32ae1ff8f09fd5b07 (diff)
downloadserenity-9a8dd38493f7860f2b0485dc9edca01e97230803.zip
LibWeb+Base: Convert String::format() to String::formatted()
This error page template is slightly hilarious and should probably be replaced with AK::SourceGenerator or some such, but for now let's just get rid of the call to String::format().
Diffstat (limited to 'Userland/Libraries/LibWeb/Loader')
-rw-r--r--Userland/Libraries/LibWeb/Loader/FrameLoader.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp
index 44ce09bfc5..d547580117 100644
--- a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp
+++ b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp
@@ -227,10 +227,10 @@ void FrameLoader::load_error_page(const URL& failed_url, const String& error)
[this, failed_url, error](auto data, auto&, auto) {
VERIFY(!data.is_null());
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
- auto html = String::format(
- String::copy(data).characters(),
- escape_html_entities(failed_url.to_string()).characters(),
- escape_html_entities(error).characters());
+ auto html = String::formatted(
+ data,
+ escape_html_entities(failed_url.to_string()),
+ escape_html_entities(error));
#pragma GCC diagnostic pop
auto document = HTML::parse_html_document(html, failed_url, "utf-8");
VERIFY(document);