evilpie / add-custom-search-engine

Add a custom search engine to the list of available search engines in Firefox
https://addons.mozilla.org/en-US/firefox/addon/add-custom-search-engine/
Mozilla Public License 2.0
173 stars 13 forks source link

Add rel=suggestions to the Url tag for suggestion #48

Closed acomagu closed 2 years ago

acomagu commented 2 years ago

I noticed suggestion doesn't work despite I fill "Suggest URL" field, like "https://www.google.com/complete/search?gl=us&output=firefox&q={searchTerms}".

Adding rel="suggestions" attribute to the <Url > tag resolved the issue, so seems the attribute is necessary(at least for Firefox 99). This PR adds it.

Reference: Google Official OpenSearch File

evilpie commented 2 years ago

Thanks for the contribution, but I think we don't need rel="suggestions" at all. None of the test cases used by Firefox have it: https://searchfox.org/mozilla-central/search?q=application%2Fx-suggestions%2Bjson. And I just manually tested using your google URL and search suggestions do work.

acomagu commented 2 years ago

I also confirmed it works (I couldn't find the reason why it wasn't work well when I submit this issue) Sorry for making confusion!💦

Thanks for great tool!