New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 790688 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 789163
Owner: ----
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , iOS , Chrome , Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Omnibox does not unescape URL fragment

Project Member Reported by elawrence@chromium.org, Nov 30 2017

Issue description

 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);
   }
 
Chrome62vsChrome64.png
23.3 KB View Download
Mergedinto: 789163
Status: Duplicate (was: Untriaged)
sigh. I misread  Issue 790688  which covers only this part, it was simply triaged to the wrong component.

Sign in to add a comment