Closed Bug 1374850 Opened 7 years ago Closed 6 years ago

%20 replaced by spaces when copying out of location bar

Categories

(Firefox :: Address Bar, defect, P3)

54 Branch
defect

Tracking

()

RESOLVED INVALID
Tracking Status
firefox57 --- fix-optional

People

(Reporter: smalyshev, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:54.0) Gecko/20100101 Firefox/54.0
Build ID: 20170608105825

Steps to reproduce:

1. Take URL that contains spaces, url-encoded, e.g.:

https://query.wikidata.org/#%23Airports%20in%20Belgium%0A%23added%20before%202016-10%0A%20%0A%23List%20of%20airports%20in%20Belgium%0A%23defaultView%3AMap%0ASELECT%20DISTINCT%20%3Fairport%20%3Fcoor%20%3Frange%0AWHERE%0A%7B%0A%20%20%3Fairport%20wdt%3AP31%20wd%3AQ1248784%20%3B%0A%20%20%3Frange%20wd%3AQ31%3B%0A%20%20wdt%3AP625%20%3Fcoor.%0A%7D

2. Paste into Firefox location bar. Press enter.
3. The URL works fine, the site loads, however you see that %20's are now spaces.
4. Select the location bar URL again, copy it
5. Go to outside application, like editor, paste it. Note that spaces are still spaces, not %20





Expected results:

Firefox should either not mess with the URL string at all, or re-encode it when copying out. Otherwise, when copying out, you do not get a valid URL but get a string that is not usable in any URL context (such as HTML, text, etc.) and has to be encoded manually before usage. While it may be OK to display spaces in raw form in location bar, it is certainly not OK to produce invalid URLs on export.
This is similar to bug 633836, but there it talks about partial URL and for me it happens with any URL, even full.
Component: Untriaged → Location Bar
Additional:
If copy the step 4's url into firefox urlbar and enter, then copy it, you will be regained the %20 url.

Expected:
No changes for entered form.
Status: UNCONFIRMED → NEW
Has STR: --- → yes
Ever confirmed: true
I just tried it in 64.0 and it seems to work fine now, so I guess this can be closed.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
I'm using v64 under win10 and the problem persists

(In reply to andy from comment #4)

I'm using v64 under win10 and the problem persists

Did you see this?

Problem persists in v69.0.1

Flags: needinfo?(adw)

you can change the browser.urlbar.decodeURLsOnCopy pref in about:config

Flags: needinfo?(adw)

anyway, I cannot reproduce the problem, are you copying the full url or a part of it?

Note, in general you shouldn't comment in bugs closed 2 years ago, it's better to file a new report and point to the closed bug.

You need to log in before you can comment on or make changes to this bug.