Remove `preferences` arg from opensearch template

When a browser adds a search engine using the opensearch template, it
does not have the correct context necessary to autofill the
`preferences` arg with the user's session prefs. As a result, queries
made using the browser bar will have the instance's default preferences
filled into the template.

Removing this shouldn't have any side effects, since queries made on the
same machine will have the correct session associated with the user.

Fixes #929
このコミットが含まれているのは:
Ben Busby 2023-03-06 15:33:28 -07:00
コミット f7c4381ba6
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: B9B7231E01D924A1
2個のファイルの変更1行の追加5行の削除

ファイルの表示

@ -251,8 +251,7 @@ def opensearch():
main_url=opensearch_url,
request_type='' if get_only else 'method="post"',
search_type=request.args.get('tbm'),
search_name=get_search_name(request.args.get('tbm')),
preferences=g.user_config.preferences
search_name=get_search_name(request.args.get('tbm'))
), 200, {'Content-Type': 'application/xml'}

ファイルの表示

@ -17,9 +17,6 @@
{% if search_type %}
<Param name="tbm" value="{{ search_type }}"/>
{% endif %}
{% if preferences %}
<Param name="preferences" value="{{ preferences }}"/>
{% endif %}
</Url>
<Url type="application/x-suggestions+json" {{ request_type|safe }} template="{{ main_url }}/autocomplete">
<Param name="q" value="{searchTerms}"/>