Closed Bug 1318813 Opened 9 years ago Closed 6 years ago

Searching for a numeric division (e.g. 12/5) in the awesomebar shows no search suggestions

Categories

(Firefox :: Address Bar, defect, P3)

51 Branch
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bruce.bugz, Unassigned)

References

Details

(Whiteboard: [fxsearch])

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:51.0) Gecko/20100101 Firefox/51.0 Build ID: 20161114004005 Steps to reproduce: Reproducible in Firefox v50 through v53.0a1. 1) Set Firefox to 'Show search suggestions in location bar results' and set Google as the default search engine. 2A) Type "12/5" (without quotes) in the awesomebar, or 2B) Type "12/5=" (without quotes) in the awesomebar Actual results: No suggestions are shown, only the '12/5 -- Search with Google' entry is shown. Screenshot - http://i.imgur.com/WsgFwOJ.png Expected results: At least the calculated search suggestion '=2.4' should have been shown, along with some other suggested searches that Google serves for the query e.g. '12/5 as a mixed number'. Here is a gallery of screenshots from all other browsers handling this correctly - http://imgur.com/a/vMDeZ. '12+2' works (http://i.imgur.com/j4wpku9.png) even in Firefox so I am hoping this is not supposed to be happening.
Has STR: --- → yes
Component: Untriaged → Location Bar
Status: UNCONFIRMED → NEW
Ever confirmed: true
Severity: normal → minor
This is done on purpose, we don't have a good way to tell if the typed text is a numerical operation or part of a url, so to stay on the safe side and protect the user privacy, we don't send that text to the search engine. We could probably filter out some of this with additional logic, but it would be only partial and hard to maintain.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
I understand that logic for the 2A case, but is there a reason preventing this from working in the 2B case with the equal sign at the end, which should make it clear enough that the end user wants the query parsed as a mathematical operation? It's become muscle memory for me to highlight the address bar (Ctrl-L) and start typing a math equation instead of opening a calculator, and the fact that Firefox breaks on anything involving division due to the "/" is irritating and makes it nearly unusable for doing quick math.
(In reply to Marco Bonardo [::mak] from comment #1) > This is done on purpose, we don't have a good way to tell if the typed text > is a numerical operation or part of a url, so to stay on the safe side and > protect the user privacy, we don't send that text to the search engine. > We could probably filter out some of this with additional logic, but it > would be only partial and hard to maintain. Please open this bug again and really resolve this problem. Method with an equal sign is looking good. Please apply that to next version of Firefox.
Flags: needinfo?(mak77)
There's no evidence the points in comment 1 are no more valid. The problem is that we use a very simple regex now to stay on the safe side, we'd need to make it far more complex, and then privacy bugs would be more likely to sneak through, just checking if there's an = at the end wouldn't cope, "12/5/=", "12/5/1=", "12/5?=" may all be valid urls, how do we distinguish a complex operation from a possibly url? I'm reopening the bug because there's value into supporting divisions, but we don't have a very good solution atm.
Flags: needinfo?(mak77)
Priority: -- → P3
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Whiteboard: [fxsearch]

I'm not sure whether this is a result of the same bug (or if it's related to https://bugzilla.mozilla.org/show_bug.cgi?id=722435) but having a single decimal point in the mathematical expression also results in no search suggestions.

e.g. "123+456" and "123+456=" produce a single Google suggestion of 579, however "12.3+4.56" and "12.3+4.56" produce no suggestions entirely.

This is minor but irritating and I hope it can be fixed easily. If there are privacy concerns over an overzealous regex leaking data, add an obscure option in about:config to give search suggestions for URL-like expressions... or let the regex itself be configurable.

Please vote for this issue.

Indeed an option in about:config to disable the privacy protection would work.

All the examples work for me today.

Status: REOPENED → RESOLVED
Closed: 9 years ago6 years ago
Resolution: --- → WORKSFORME

What platform are you on?

Flags: needinfo?(mak77)

Windows 10, using Firefox Nightly. Not sur why the platform would matter here.

Flags: needinfo?(mak77)

I'm on Fedora & stable. The fix probably hasn't reached stable.

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