Closed
Bug 926510
Opened 11 years ago
Closed 11 years ago
Parentheses in valid URLs incorrectly escaped into copied string (breaking URLs)
Categories
(Firefox :: Address Bar, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 824887
People
(Reporter: quaderi, Unassigned)
References
()
Details
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.69 Safari/537.36
Steps to reproduce:
1) Visit any website with parentheses in the url
E.g. http://en.wikipedia.org/wiki/Firefox_(disambiguation)
2) Copy and paste the link in the URL into any plain text box or editor
Actual results:
The pasted text, incorrectly encodes parentheses which are VALID in urls producing the following text:
http://en.wikipedia.org/wiki/Firefox_%28disambiguation%29
Expected results:
The pasted text, should NOT have encoded the parentheses and should have left the parentheses as is:
http://en.wikipedia.org/wiki/Firefox_(disambiguation)
Reporter | ||
Comment 1•11 years ago
|
||
The cause of the problem in Firefox appears to be this:
Line 306 of urlbarBindings.xml
http://hg.mozilla.org/mozilla-central/file/7f66adec37ac/browser/base/content/urlbarBindings.xml
305 // Parentheses are known to confuse third-party applications (bug 458565).
306 val = val.replace(/[()]/g, function (c) escape(c));
Looks like there was a poorly thought out fix in Firefox to work around the fact that external lightweight markup language systems like Markdown have users who don’t know about the need to use an escape character before closing parentheses according to Markdown’s own syntax standards…
http://hg.mozilla.org/mozilla-central/rev/7f66adec37ac
https://bugzilla.mozilla.org/show_bug.cgi?id=458565
Note that this results in broken URLs. While some websites like Wikipedia may be able to handle the incorrectly escaped URLs it will then be given, that shouldn't be something we rely on.
Reporter | ||
Updated•11 years ago
|
Component: Untriaged → Location Bar
Version: Trunk → 27 Branch
Updated•11 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•