0

I have custom search engine added into Firefox search bar. When I enter there e.g. "Who am I?" it gets passed to custom search engine as "Who+am+It%253F" rather than expected "Who+am+It%3F". Result is that search engine returns empty results set.

It works fine on e.g. Chrome.

Also was trying some other OpenSearch search engines e.g. Wikipedia or DuckDuckGo in the same Firefox which work just fine.

Do you have any idea what can be the source of issue?

It looks like the searchTerms is encoded twice or something like that.

Here is XML used

<?xml version="1.0"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
    <ShortName>ShortName</ShortName>
    <LongName>LongName</LongName>
    <Description>Description</Description>
    <Tags>discussions friends articles</Tags>
    <Contact>admin@domain.com</Contact>
    <Url type="text/html" method="get" template="URL?param=value&amp;query={searchTerms}"/>
    <Image height="16" width="16" type="image/x-icon">URL/favicon.ico</Image> 
    <Image height="64" width="64" type="image/png">URL/nikoscope64.png</Image> 
    <Query role="example" searchTerms="st" />
  <AdultContent>false</AdultContent>
  <Language>en-us</Language>
  <InputEncoding>UTF-8</InputEncoding>
  <OutputEncoding>UTF-8</OutputEncoding>
</OpenSearchDescription>
krajicek
  • 57
  • 1
  • 2
  • 9

1 Answers1

0

The source of the issue seems to be Url.template which was pointing to results page using HTTP protocol even though the server was running on HTTPS protocol.

Changing this part:

<Url type="text/html" method="get" template="http://SOME_DOMAIN?param=value&amp;query={searchTerms}"/>

into

<Url type="text/html" method="get" template="https://SOME_DOMAIN?param=value&amp;query={searchTerms}"/>

resolved the problem. Please note that emptying your browser cache is not enough to get new version of OpenSearch XML. One needs to remove and re-add the search engine

krajicek
  • 57
  • 1
  • 2
  • 9