Closed Bug 1948636 Opened 1 year ago Closed 1 year ago

Change query parameter handling in EngineURL to be consistent, regardless of how the full URL is specified

Categories

(Firefox :: Search, task, P3)

task

Tracking

()

RESOLVED FIXED
138 Branch
Tracking Status
firefox138 --- fixed

People

(Reporter: standard8, Assigned: mbeier)

References

Details

(Whiteboard: [sng][search-tech-debt])

Attachments

(1 external file)

EngineURL currently has two different methods of handling query parameters, depending on how it is constructed.

For application provided engines, the URLs are typically just the pre-path plus the file path, e.g. https://example.com/search and then the parameters are stored separately.

However, third party add-ons, OpenSearch engines are typically specified with the parameters in the url, e.g. https://example.com/search?q={searchTerms}&foo=bar.

This causes us to have to do various bits of special handling.

It also provides a potential non-obvious cause for bugs, such as bug 1948541 - there we changed how the search term was processed for the template, but forgot this would affect cases where the template includes the query parameters.

To fix this, we should make EngineURL always store the query parameters separate to the non-query part of the URL. This should help resolve bug 1948541, and make it simpler in future.

When fixing this, we should make sure that the different URL structures are correctly handled when loading from or saving to the settings file, with a migration if necessary.

No longer blocks: 1948541
Depends on: 1948541
Assignee: nobody → mbeier
Status: NEW → ASSIGNED
Pushed by mbeier@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/93213d59d31e Change query parameter handling in EngineURL to be consistent, regardless of how the full URL is specified. r=Standard8
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 138 Branch
Regressions: 2002920
QA Whiteboard: [search] [qa-triage-done-c147/b146]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: