From f7c4381ba626dfa76e4d6563db4d37cde5ee71a3 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Mon, 6 Mar 2023 15:33:28 -0700 Subject: [PATCH] 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 --- app/routes.py | 3 +-- app/templates/opensearch.xml | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/app/routes.py b/app/routes.py index d643b15..3b074fa 100644 --- a/app/routes.py +++ b/app/routes.py @@ -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'} diff --git a/app/templates/opensearch.xml b/app/templates/opensearch.xml index 0dd6b0f..df421e3 100644 --- a/app/templates/opensearch.xml +++ b/app/templates/opensearch.xml @@ -17,9 +17,6 @@ {% if search_type %} {% endif %} - {% if preferences %} - - {% endif %}