URL containing spaces are treated as search terms
Categories
(Fenix :: Toolbar, enhancement)
Tracking
(firefox130 affected, firefox131 affected, firefox132 affected)
People
(Reporter: boek, Unassigned)
References
(Depends on 1 open bug)
Details
From github: https://github.com/mozilla-mobile/fenix/issues/3306.
Steps to reproduce
- Open the search/address bar
- Type "http://example.com/foo bar"
Expected behavior
- The page "http://example.com/foo bar" is opened
Actual behavior
- A Google search for "http://example.com/foo bar" is made
You might wonder why the hell one would open an url with spaces in them. Well, originally here's what happened to me: I opened the search/address bar, and used the QR code scanner, to scan a QR code. The url the QR code decoded to contained spaces. So I was brought to a google search rather than what I was supposed to see.
Device information
- Android device: Nexus 5
- Fenix version: 1.0.1923 (Build #11590615 68.0-20190604110028)
┆Issue is synchronized with this Jira Task
Change performed by the Move to Bugzilla add-on.
Updated•2 years ago
|
Comment 1•2 years ago
|
||
Implementation hint:
What matches /^[a-z\d]{1,32}:\/\// would likely to be an intended URI.
Comment 2•2 years ago
|
||
Also note [ https://github.com/mozilla-mobile/fenix/issues/5403 ]:
It is also entirely possible for the search term just to be an URI: e.g. [ https://translate.google.com/translate?hl=en&sl=auto&tl=en&u=${Term} ].
Comment 3•6 months ago
|
||
I'm affected by this bug when using Wikipedia for example:
Entering http://en.wikipedia.org/wiki/Main Page with a space in between Main and Page in the URL bar. I have to use an alternative browser when editing Wikipedia on mobile because of this bug.
Updated•3 months ago
|
Comment 5•3 months ago
|
||
The behaviors mentioned in the initial report and in Comment 3 can be reproduced in the latest releases: Nightly 132.0a1, Beta 131.0b4, release 130.0.
Comment 6•2 months ago
|
||
Just adding some perspective here that fixing this would probably break my workflow a little bit (XKCD#1172 moment :P). If I'm trying to search for a URL in a search engine, I usually paste it into the search bar and append something like " a" to it.
Not a huge issue because I can always prepend the URL, but thought it worth adding another perspective.
Description
•