From 747c855a0cff0b24c565adf0cf49da0328894ca4 Mon Sep 17 00:00:00 2001 From: Brandon-T Date: Fri, 8 Oct 2021 11:57:52 -0400 Subject: [PATCH] Fix #4301: Fix session restore with special characters not working (#4307) --- Shared/Extensions/URLExtensions.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Shared/Extensions/URLExtensions.swift b/Shared/Extensions/URLExtensions.swift index 248e82e52cb..ee87e244aa2 100644 --- a/Shared/Extensions/URLExtensions.swift +++ b/Shared/Extensions/URLExtensions.swift @@ -439,7 +439,7 @@ extension URL { let components = URLComponents(url: url, resolvingAgainstBaseURL: false) if self.isErrorPageURL, let queryURL = components?.queryItems?.find({ $0.name == "url" })?.value { - return URL(string: queryURL) + return URL(string: queryURL) ?? URL(string: queryURL.escape() ?? queryURL) } return nil }