Open Bug 1251657 Opened 8 years ago Updated 1 year ago

bookmarks.search doesn't allow quoted search terms

Categories

(WebExtensions :: General, defect, P5)

defect

Tracking

(Not tracked)

REOPENED

People

(Reporter: wbamberg, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [bookmarks]triaged)

In Chrome you can search for bookmarks by providing a string containing search terms. Search terms are space-delimited, but you can search for strings that include spaces by quoting them.

So given a bookmarks with a title like "Example Domain":

    example              -> matches
    example domain       -> matches
    domain example       -> matches
    "example domain"     -> matches
    "domain example"     -> does not match


In Firefox, you can't quote search terms:

    example              -> matches
    example domain       -> matches
    domain example       -> matches
    "example domain"     -> does not match
    "domain example"     -> does not match

https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/bookmarks/search
Summary: bookmarks.search doesn't let search include spaces → bookmarks.search doesn't allow quoted search terms
We should try to use the same parser for both of these APIs.
Summary: bookmarks.search doesn't allow quoted search terms → bookmarks.search and downloads.search don't allow quoted search terms
Confirmed that Chrome actually does match its documented behavior for downloads.search().  Specifically, it only accepts an array for query, not a string.  And the elements of the array are used as search terms without any further parsing or processing.
This is a sane API and I think we should do the same for downloads, bookmarks is obviously complicated by the goal of being compatible with existing Chrome extensions that rely on parsing...
Summary: bookmarks.search and downloads.search don't allow quoted search terms → bookmarks.search doesn't allow quoted search terms
Assignee: nobody → mail
Blocks: 1213674
Status: NEW → ASSIGNED
Is this something you still plan on working on this :johannh?
Flags: needinfo?(jhofmann)
Priority: -- → P3
Whiteboard: triaged
Hey Andy, technically I'm still planning to do this but if you folks have capacity or want this done quickly I don't mind giving it up :)
Assignee: jhofmann → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(jhofmann)
Component: WebExtensions: Untriaged → WebExtensions: General
Priority: P3 → P5
Assignee: nobody → mstriemer
Whiteboard: triaged → [bookmarks]triaged
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
Status: RESOLVED → REOPENED
Resolution: INACTIVE → ---
Product: Toolkit → WebExtensions
Assignee: mstriemer → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.