The second %s in Alias Search is not expanded to search term for User Search Engines
Categories
(Firefox :: Search, defect, P5)
Tracking
()
People
(Reporter: artur, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
Updated•8 years ago
|
Comment 1•2 years ago
|
||
I'm still seeing this in Firefox 107.0a1.
Chromium does expand the second %s.
Updated•2 years ago
|
Comment 2•2 years ago
|
||
The code seems to expand any %s https://searchfox.org/mozilla-central/rev/ffa4d00965c5281def6d3ddcbcdf6259d38c9b9a/toolkit/modules/KeywordUtils.sys.mjs#85-90
I tried creating a bookmark with the given url and assigning a keyword, and both %s were replaced for me.
Could you please post a screenshot of when you are settings this Keyword Search field, or a short screen cast?
Reporter | ||
Comment 3•2 years ago
|
||
Nightly 107.0a1 resolves all %s to the searched string properly.
From my point of view, the bug can be closed.
Comment 4•2 years ago
|
||
Search URL: https://www.google.com/search?q=%s+%s
Keyword: test
Comment 5•2 years ago
|
||
Nightly 107.0a1 (2022-10-10) Win/64.
I type "test foo" in the address bar.
Expected: Google search results for "foo foo".
Actual: Google searches for "foo %s" are displayed.
Comment 6•2 years ago
|
||
I cannot reproduce that behavior, I tried the url in comment 4 and it replaces both %s for me. I'm testing with Nightly on Win10.
Comment 7•2 years ago
|
||
I've reproduced this in a new Firefox profile. The only setting I changed was setting browser.urlbar.update2.engineAliasRefresh=true before adding the search shortcut.
Also testing with Nightly on Win10.
Comment 8•2 years ago
|
||
I tried a fresh download of the en-US version of Nightly, on a VM with no previous Firefox install. I still only get one %s substitution.
Comment 9•2 years ago
|
||
(In reply to Marco Bonardo [:mak] from comment #2)
The code seems to expand any %s https://searchfox.org/mozilla-central/rev/ffa4d00965c5281def6d3ddcbcdf6259d38c9b9a/toolkit/modules/KeywordUtils.sys.mjs#85-90
Yes, but that code also appears to replace both "%s" and "%S":
url = url.replace(/%s/g, encodedParam).replace(/%S/g, param);
However if I create a search shortcut with %S in the URL (i.e. https://www.google.com/search?q=%S) no substitution occurs.
Comment 10•2 years ago
|
||
I see, this is Search Engine Alias, not Bookmark keywords. Bookmark keywords work as expected.
I'll confirm this as a Search bug, though note browser.urlbar.update2.engineAliasRefresh is not officially supported yet.
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 11•10 months ago
|
||
See also: Bug 1893594.
Description
•