Spaces encoded without + in URL with Custom Search Engines
Categories
(Firefox :: Search, defect)
Tracking
()
People
(Reporter: sergegardien, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:149.0) Gecko/20100101 Firefox/149.0
Steps to reproduce:
- Open
about:config. - Search for
browser.urlbar.update2.engineAliasRefresh. - Click the + button to enable the preference.
- Navigate to
about:preferences#search. - Click the Add button to create a new search engine.
- Add a Google custom search engine with the following URL:
https://www.google.com/search?q=%s - Perform a search using multiple terms, for example:
This is a test - Copy and paste the resulting URL from the address bar into another application or text field.
Actual results:
The resulting URL contains literal spaces instead of encoded ones. For example:
https://www.google.com/search?q=This is a test
Because the spaces are not encoded, copying and pasting the URL into other applications may cause it not to be recognized as a single valid link.
This issue is similar to, but distinct from, the previously resolved bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=1948541
Expected results:
Spaces in the search query should be encoded using +, as in previous Firefox behavior. The resulting URL should be:
https://www.google.com/search?q=This+is+a+test
Encoding spaces with + ensures the URL is valid and recognized correctly when copied and pasted or shared.
Comment 1•25 days ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::Address Bar' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
| Reporter | ||
Updated•20 days ago
|
Comment 2•16 days ago
|
||
Is the value of the browser.urlbar.decodeURLsOnCopy pref currently set to true (which would keep the spaces in the URL)?
Also note that browser.urlbar.update2.engineAliasRefresh in the STR's in Step 2 is no longer needed, as this capability is available broadly 🙂
| Reporter | ||
Comment 3•16 days ago
|
||
I've checked browser.urlbar.decodeURLsOnCopy, and it is set to false. Despite that, the copied URL still contains literal spaces instead of encoded ones.
Thanks for the clarification regarding browser.urlbar.update2.engineAliasRefresh.
Comment 4•15 days ago
|
||
Unfortunately we're not able to reproduce this. So a few additional questions:
- Does this reproduce if you're pasting back into Firefox onto a page?
- Does it happen with the Google search engine that's provided by Firefox?
- Does it happen with a fresh profile?
| Reporter | ||
Comment 5•15 days ago
|
||
To answer your questions:
- yes
- I don't have anymore the Google Search Engine provided by Firefox and I cannot find an easy way to re-add it without resetting all the search engines I configured
- Actually with a fresh profile everything looks fine.
That said, the profile where I've seen the issue has been created from scratch not long ago to fix some unrelated issues I was having. I have applied some changes to the about:config of this profile and installed some extensions (noscript, ublock, etc.) but the issue with the space encoding appeared out of the blue after a version update of Firefox, otherwise it was absent.
| Reporter | ||
Comment 6•15 days ago
|
||
I tried the Troubleshooting Mode and the problem disappeared so I figured it was caused by an extension and indeed it was this one:
https://addons.mozilla.org/en-GB/firefox/addon/clearurls/
| Reporter | ||
Comment 7•15 days ago
|
||
I just reported this bug on the GitHub issue page of the addon:
https://github.com/ClearURLs/Addon/issues/511
Comment 8•14 days ago
|
||
Thank you for identifying that. I'll mark this a moved to a different tracker, as this is not something in Firefox itself.
Description
•