Typing a URL in address bar will result in a search for the URL if it contains a \u200b character
Categories
(Firefox :: Address Bar, enhancement)
Tracking
()
People
(Reporter: cecilialopes, Unassigned)
Details
Attachments
(3 files)
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/112.0
Steps to reproduce:
When copying an URL from a PDF file and trying to insert it in the address bar of firefox, it invariably made a search for the URL instead of accessing it. When I pasted the URL in notepadqq, I found a \u200b (zero width space) character after "https" and before ":". This made the browser interpret the address as a search query instead of an URL.
Since no user is ever going to type a \u200b character as part of a search, ideally firefox should strip this character off the query before checking if it's an URL.
Comment 1•2 years 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.
Hello, thank you for the bug report!
Unfortunately I could not reproduce your issue. Would you be so kind as to answer a few questions so we can investigate this further?
- Does this issue happen with a new profile? Here is a link on how to create one: https://support.mozilla.org/en-US/kb/profile-manager-create-remove-switch-firefox-profiles
- Does this issue happen with latest nightly? Here is a link from where you can download it: https://www.mozilla.org/en-US/firefox/channel/desktop/
- Does this issue happen when Firefox is in Troubleshoot Mode? Here's a link on how to enable it: https://support.mozilla.org/en-US/kb/diagnose-firefox-issues-using-troubleshoot-mode#w_how-to-start-firefox-in-troubleshoot-mode
- Do you have by any chance the sample pdf you copied the url from? If so, could you please attach it here in the bug?
Thank you.
| Reporter | ||
Comment 3•2 years ago
|
||
The offending PDF file. Most of the URLs in the references section contain \u200b characters between "https" and ":\"
| Reporter | ||
Comment 4•2 years ago
|
||
Text file with a single URL which, when pasted on the address bar, displays the behavior described.
| Reporter | ||
Comment 5•2 years ago
|
||
| Reporter | ||
Comment 6•2 years ago
|
||
I've tried it in a new profile, in nightly, and in troubleshoot mode. Same behavior in all of them.
| Reporter | ||
Comment 7•2 years ago
|
||
FWIW, some more notes:
- Using the link in the text file I attached here, I got the same behavior on Firefox 112 on both android and windows 11.
- It appears that my PDF software is responsible for adding the \u200b characters in the url. It doesn't happen when I copy the URL from the PDF file when the PDF file is opened directly on Firefox. And when I open it on Acrobat 11, the copied URL had regular spaces (\u0020) where the \u200b would otherwise appear.
- Nevertheless, you should be able to reproduce the behavior I described using the contents of the text file I attached.
Thank you for the attachment, Cecilia!
Reproducible on macOS 12, Windows 10, Ubuntu 22 on:
- Firefox 113.0;
- Firefox 114.0b1;
- Nightly 115.0a1;
Setting as NEW so the developers can have a look.
Comment 9•2 years ago
|
||
We won't fix this for a few reasons:
- we don't want to "hide" problems. You figured there was a problem in the url by that copy/paste, imagine an author that thinks everything is working after testing the url, but we secretly fixed it. They won't notice a problem.
- we are consistent with other browsers (at least chromium based ones), While this in itself is not a sufficient justification, along with point 1. it means the author tests their whitepaper in Firefox, everything works, but then it's still broken in other browsers
- The example pdf works for me, that means the zero-width space was probably added by your Linux pdf reader... Again it's better to notice and report that as a bug to the pdf reader authors
- By removing the zero-width space we're pretty much transforming the protocol. While I can't think of stron concerns as of now, we should evaluat potential security concerns with doing that
- maybe a url could have been de-linkified by choice (imagine a whitepaper linking to malware sites as examples) and we probably don't want to make it easier to access them
Description
•