Closed Bug 941043 Opened 11 years ago Closed 6 years ago

Firefox does not properly encode the url on copy

Categories

(Firefox :: Address Bar, defect)

26 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: filip_wieladek, Unassigned)

References

Details

(Whiteboard: [bugday-20131125])

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/30.0.1599.114 Chrome/30.0.1599.114 Safari/537.36

Steps to reproduce:

1) Enter a Url such as https://bugzilla.mozilla.org/enter_bug.cgi#h=bugForm%7CFirefox
2) Firefox will display it as https://bugzilla.mozilla.org/enter_bug.cgi#h=bugForm|Firefox with the | character
3) copy the Url into the clipboard



Actual results:

The url has the pipe character


Expected results:

The Url should have escaped the pipe character to %7C, in the same way it does for spaces

According to the spec ( http://tools.ietf.org/html/rfc3986) the pipe character is not a valid URL character.
Behavior confirmed with 2013-11-24-10-48-39-mozilla-central-firefox-28.0a1.en-US.linux-x86_64.
Component: Untriaged → Location Bar
See Also: → 918331
Whiteboard: [bugday-20131125]
I have the same problem with brackets/parentheses. Here is a URL I've copied from Firefox's location bar:

http://cropper.onefinestay.com/nfXjn8tbV2KzVjreQa4V9N4Y-_Y=/144x48:5016x3383/fit-in/678x0/filters:quality%2885%29/https://ofs-media-production.s3.amazonaws.com/media-library/0b4cedfb16ac841b6f9c96ed8dad057d20afc99c.jpg

The section quality%2885%29 should be quality(85) and pasting it into another tab/browser fails meaning that I can't share the link with anyone without replacing the brackets.

Pasting the URL above into Firefox fails but shows the brackets un-escaped. Going to the address bar and replacing both brackets with seemingly identical characters using the keyboard makes it work. Copying the working URL from the address bar and then pasting it straight away causes the failure again.

For anyone interested, Thumbor (https://github.com/globocom/thumbor/wiki) is the server that is using brackets within URLs. I think it's quite a popular tool with over 900 github stars so other people must be having trouble with this.
See Also: → 1124600
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.