Closed Bug 722653 Opened 13 years ago Closed 12 years ago

Pipes (|) in the URL bar are decoded for display and not re-encoded when submitting the URL again

Categories

(Firefox :: Address Bar, defect)

12 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: dg, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0a1) Gecko/20120130 Firefox/12.0a1 Build ID: 20120130031142 Steps to reproduce: Install FF 12.0a1 (2012-01-30) Open https://www.google.com/?q=a%7Cb Note that the URL bar now shows https://www.google.com/?q=a|b Click into the URL bar, press enter Actual results: GET request to https://www.google.com/?q=a|b (you can watch in HttpFox) Firefox does not encode the | ("pipe") character Expected results: GET request to https://www.google.com/?q=a%7Cb Firefox should encode the | ("pipe") character, according to http://en.wikipedia.org/wiki/Percent-encoding
Thanks for filing the bug, sorry it stayed untouched. Can you reproduce it with a recent version (also it might be helpful if Firefox's internal development tools can be used for that)?
Component: Untriaged → Location Bar
(In reply to dg from comment #0) > User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0a1) Gecko/20120130 > Firefox/12.0a1 > Build ID: 20120130031142 > > Steps to reproduce: > > Install FF 12.0a1 (2012-01-30) > Open https://www.google.com/?q=a%7Cb > Note that the URL bar now shows https://www.google.com/?q=a|b > Click into the URL bar, press enter > > > Actual results: > > GET request to https://www.google.com/?q=a|b (you can watch in HttpFox) > Firefox does not encode the | ("pipe") character > > > Expected results: > > GET request to https://www.google.com/?q=a%7Cb > Firefox should encode the | ("pipe") character, according to > http://en.wikipedia.org/wiki/Percent-encoding That page doesn't actually say that | should be encoded. Instead, it says: "Characters from the unreserved set never need to be percent-encoded. [...] For maximum interoperability, URI producers are discouraged from percent-encoding unreserved characters."
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
(In reply to Dão Gottwald [:dao] from comment #2) > That page doesn't actually say that | should be encoded. Instead, it says: > "Characters from the unreserved set never need to be percent-encoded. [...] > For maximum interoperability, URI producers are discouraged from > percent-encoding unreserved characters." I disagree. The pipe symbol is neither in the set of reserved nor the set of unreserved characters (the article gives a complete list of both character sets), thus your quote does not apply. RFC2396 even has a section (2.4.3) mentioning the pipe character ("unwise") and continues: "Data corresponding to excluded characters must be escaped in order to be properly represented within a URI." The issue is still present in Firefox 23.0 (Ubuntu 13.04) and can be observed as described earlier.
You need to log in before you can comment on or make changes to this bug.