我在Firefox搜索栏中添加了自定义搜索引擎。当我进入那里时,例如“我是谁?” 它作为"Who+am+It%253F"而不是预期的"Who+am+It%3F"传递给自定义搜索引擎。结果是搜索引擎返回空结果集。
它在例如 Chrome 上运行良好。
还在同一个Firefox中尝试了其他一些 OpenSearch 搜索引擎,例如 Wikipedia 或 DuckDuckGo,它们工作得很好。
您知道问题的根源是什么吗?
看起来 searchTerms 被编码了两次或类似的东西。
这是使用的 XML
<?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&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>