Closed Bug 1873788 Opened 1 year ago Closed 1 year ago

Bookmark keyword search and search mode search uses the default engine search when there is restrict symbol at the end of search string

Categories

(Firefox :: Address Bar, defect, P3)

defect

Tracking

()

VERIFIED FIXED
123 Branch
Tracking Status
firefox123 --- verified

People

(Reporter: mcheang, Assigned: mcheang)

Details

Attachments

(1 file)

While working on Bug 1667639 - Ending a keyword query with a question mark (?) searches default search engine instead and restricts to search Marco and I found another bug. This bug can manifest in two ways:

1 Bookmark keyword search

Steps To Reproduce:

  1. Add a bookmark keyword
    a. Go to https://unsplash.com/
    b. Right click on the page's search bar
    c. Click on "Add a keyword for this search"
    d. Add "unsplash" as the keyword and save it.

  2. Type unsplash kitten * onto Firefox's address bar

  3. Hit enter and it will search unsplash kitten * on the default search engine.

Expected:
It should search kitten * on the unsplash website.

Actual:
It searched unsplash kitten * on the default engine search result page.

2 Alias Search

  1. Navigate to about:preferences#search
  2. Add a keyword for one the search engines. E.g. wiki for wikpedia
  3. Copy wiki kitten? or wiki kitten ? (either one would work)
  4. Right click the address bar by clicking Paste and Go
  5. It searched wiki kitten? on the default search engine

Expected:
It should search kitten? on wikipedia.

Actual:
It searched kitten? on the default engine search result page.

This patch fixes all restrict symbols at the end EXCEPT it does not fix the ? restrict symbol. Another patch will be updated to fix the ? restrict symbol at the end of a search string in Bug 1667639.

search when restrict symbols are at the end of the search string. r=mak!

This patch does not fix the ? symbol at the end. That fix will be in Bug 1667639.

Attachment #9371888 - Attachment description: WIP: Bug 1873788 - Fix bookmark keyword and alias search switching to default engine → Bug 1873788 - Fix bookmark keyword and alias search switching to default engine search when restrict symbols are at the end of the search string. r=mak!
Pushed by mcheang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/251453e9c9c7 Fix bookmark keyword and alias search switching to default engine search when restrict symbols are at the end of the search string. r=mak
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 123 Branch

Reproducible on a 2024-01-09 Nightly build on Windows 10.
Verified as fixed on Firefox Nightly 123.0a1 on Windows 10, Ubuntu 22, macOS 12.

Scenario 1 - Bookmark keyword search is respected and kitten * is searched on Unsplash website.

Scenario 2 - Alias Search is respected. Once you Paste and Go the following string, wiki kitten ?, the search is made on Wikipedia.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: