diff --git a/Base/res/html/error.html b/Base/res/html/error.html index 058ae0514a7..8b06ed12a8d 100644 --- a/Base/res/html/error.html +++ b/Base/res/html/error.html @@ -14,8 +14,8 @@
Warning -

Failed to load %s

+

Failed to load {}

-

Error: %s

+

Error: {}

diff --git a/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp b/Userland/Libraries/LibWeb/Loader/FrameLoader.cpp index 44ce09bfc58..d547580117f 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);