Issue 789163 changed handling of URL fragments (the portion of the URL after the # symbol) so that they are %-escaped.
However, Chrome's omnibox does not unescape the fragment component, leading to a (likely unwanted) visual change in behavior in scenarios where the fragment contains characters that were previously unescaped.
(See attached image).
The patch to get Chrome's omnibox to unescape the fragment (as it currently does for the url's path and query components) is small in size, but carries unknown risk at this late date.
--- a/components/url_formatter/url_formatter.cc
+++ b/components/url_formatter/url_formatter.cc
@@ -586,11 +586,10 @@ base::string16 FormatUrlWithAdjustments(
NonHostComponentTransform(unescape_rules),
&url_string, &new_parsed->query, adjustments);
- // Ref. This is valid, unescaped UTF-8, so we can just convert.
if (parsed.ref.is_valid())
url_string.push_back('#');
AppendFormattedComponent(spec, parsed.ref,
- NonHostComponentTransform(net::UnescapeRule::NONE),
+ NonHostComponentTransform(unescape_rules),
&url_string, &new_parsed->ref, adjustments);
}
|
Deleted:
Chrome62vsChrome64.png
23.3 KB
|
Comment 1 by elawrence@chromium.org
, Nov 30 2017Status: Duplicate (was: Untriaged)