New issue
Advanced search Search tips
Starred by 5 users
Status: Duplicate
Merged: issue 45051
Owner: ----
Closed: Aug 2010
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

  • Only users with Commit permission may comment.

Sign in to add a comment
Chrome converts every backslash in the URL into forward slashes
Reported by, Oct 27 2009 Back to list
Chrome Version       : (Official Build 28507)
URLs (if applicable) :$x=\int{-b\pm\sqrt{b^2-4ac}$
Other browsers tested: Firefox
Add OK or FAIL after other browsers where you have tested this issue:
Safari 4:
  Firefox 3.x: OK
IE 7:
IE 8:

What steps will reproduce the problem?
1. Copy the URL in the address bar
2. Click Go

What is the expected result?
That url to be accessed

What happens instead?
It is accessing the URL with the backslashes converted to forward slashes.

Please provide any additional information below. Attach a screenshot if

Comment 1 by, Oct 27 2009
Regarding other browsers:
  Safari 4 - FAIL, Opera 10 - FAIL, Firefox 3 - OK, IE 7/8 - FAIL (and Chrome - FAIL)

One response to this issue is that according to 
backslash characters are not valid characters in URLs so how Firefox handles invalid 
URL characters (including the backslash) may not be the way Chrome and other browsers 
handle the backslash.  All other browsers tested in this comment convert the 
backslash into forward slashes.

Technically, if you required backslash characters in your URL you need to encode them 
using %5C.  The above URL with the backslashes encoded is:$x=%5Cint{-b%5Cpm%5Csqrt{b^2-4ac}$
Comment 2 by, Oct 27 2009
In fact, the above URL with all invalid characters encoded properly would be:$x=%5Cint%7B-b%5Cpm%5Csqrt%7Bb%5E2-4ac%7D$
Comment 3 by, Oct 27 2009
Labels: -Area-Misc Area-BrowserUI
Status: Untriaged
However, the other response is that there is one problem that is only in Chrome.

When going to the fully encoded URL given in Comment 2, Chrome will update the 
Omnibox URL with the decoded characters.  However, if you then highlight the Omnibox 
URL and Copy it, then Paste it again it shows as:$x=/int%7B-b/pm/sqrt%7Bb%5E2-4ac%7D$

This problem is only in Chrome.  Firefox will preserve the backslashes, and the other 
browsers do not redisplay the decoded characters but keep the character encodings.

There is definitely a Chrome only bug that "Chrome converts every backslash in the 
URL into forward slashes".
Comment 4 by, Oct 27 2009
Well, it was not my intention to report this exactly as a bug but as an "inconvenient

AFAIK that RFC does not force any browser to especifically replace backslashes with
forward ones. IMHO "\" would be better replaced with "%5C" than with "/" in the same
way as " " is replaced with "%20" or "{" is replaced with "%7B".

I know that inserting Latex strings in URLs could sound weird. But "/" is not the
same as "\" and maybe when a user writes "\" he means "\" ("%5C"). 

Concerning #3, I would not call that a bug. Every browser shows the "%20"
replacements in the address bar, I don't see the point of hiding the slash replacements. 
Comment 5 by, Oct 27 2009
Comment #3 is definitely a bug.

Every other browser except Firefox shows the encoding replacements (maintaining %5C for 
the backslashes) which is fine.  Firefox shows the decoded characters but preserves the 
backslashes when copying and pasting, which is also fine.

Chrome also shows the decoded characters but changes backslashes to forward slashes 
after copying and pasting, which is a bug.
Labels: Mstone-X Feature-Omnibox
Status: Available
Comment 7 by, Dec 14 2009
I've looked into it a bit - looks like it's converted by googleurl's path 
canonicalizer.  In googleurl/src/ there's a line that silently 
converts backslashes to forward slashes.  It won't be very hard to fix it (e.g. make 
it optional), but I'm not sure how I can change the code in googleurl.
Comment 8 by, Dec 18 2009
Labels: -Area-BrowserUI Area-UI-Features
Area-UI-Features label replaces Area-BrowserUI label
Labels: -Area-UI-Features Area-UI
Mergedinto: 45051
Status: Duplicate
Project Member Comment 11 by, Oct 12 2012
Labels: Restrict-AddIssueComment-Commit
Mergedinto: chromium:45051
This issue has been closed for some time. No one will pay attention to new comments.
If you are seeing this bug or have new data, please click New Issue to start a new bug.
Project Member Comment 12 by, Mar 11 2013
Labels: -Feature-Omnibox -Area-UI Cr-UI-Browser-Omnibox Cr-UI
Sign in to add a comment