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
This commit is contained in:
Ben Busby
2023-03-06 15:33:28 -07:00
parent baa8bd0eb4
commit f7c4381ba6
2 changed files with 1 additions and 5 deletions
+1 -2
View File
@@ -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'}
-3
View File
@@ -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}"/>