From 33396494f66d0c292b8625575d784dfb44792c1b Mon Sep 17 00:00:00 2001 From: Max Wipfli Date: Tue, 1 Jun 2021 11:11:05 +0200 Subject: [PATCH] AK+LibWeb: Remove URL::to_string_encoded() This replaces URL::to_string_encoded() with to_string() and removes the former, since they are now equivalent. --- AK/URL.h | 2 -- Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp | 2 +- Userland/Libraries/LibWeb/OutOfProcessWebView.cpp | 3 ++- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/AK/URL.h b/AK/URL.h index ba546c8057..f229b0d188 100644 --- a/AK/URL.h +++ b/AK/URL.h @@ -79,9 +79,7 @@ public: String serialize(ExcludeFragment = ExcludeFragment::No) const; String serialize_for_display() const; - String to_string() const { return serialize(); } - String to_string_encoded() const { return serialize(); } bool equals(URL const& other, ExcludeFragment = ExcludeFragment::No) const; diff --git a/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp b/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp index b02fb31ccd..50c82d7eaf 100644 --- a/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp +++ b/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp @@ -156,7 +156,7 @@ void ResourceLoader::load(const LoadRequest& request, Function"); - builder.appendff("The web page {} has crashed.

You can reload the page to try again.", escape_html_entities(m_url.to_string_encoded()), escape_html_entities(m_url.to_string())); + auto escaped_url = escape_html_entities(m_url.to_string()); + builder.appendff("The web page {} has crashed.

You can reload the page to try again.", escaped_url, escaped_url); builder.append(""); load_html(builder.to_string(), m_url); }