From bfdad7bc0f867f67675c1d8c539c58e82f450c58 Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Mon, 5 Oct 2020 15:38:05 +0200 Subject: [PATCH] [fix] opensearch.xml URL contains method and autocomplete parameters When the user add searx as a search engine, the browser loads the /opensearch.xml URL without the cookies. Without the query parameters, the user preferences are ignored (method and autocomplete). In addition, opensearch.xml is modified to support automatic updates, see https://developer.mozilla.org/en-US/docs/Web/OpenSearch --- searx/templates/__common__/opensearch.xml | 4 ++++ searx/templates/__common__/opensearch_response_rss.xml | 2 +- searx/templates/courgette/base.html | 2 +- searx/templates/legacy/base.html | 2 +- searx/templates/oscar/base.html | 2 +- searx/templates/simple/base.html | 2 +- searx/webapp.py | 3 +++ 7 files changed, 12 insertions(+), 5 deletions(-) diff --git a/searx/templates/__common__/opensearch.xml b/searx/templates/__common__/opensearch.xml index 244e10132..e76a14aff 100644 --- a/searx/templates/__common__/opensearch.xml +++ b/searx/templates/__common__/opensearch.xml @@ -15,4 +15,8 @@ {% if autocomplete %} {% endif %} + + diff --git a/searx/templates/__common__/opensearch_response_rss.xml b/searx/templates/__common__/opensearch_response_rss.xml index 3781dd87c..686443c49 100644 --- a/searx/templates/__common__/opensearch_response_rss.xml +++ b/searx/templates/__common__/opensearch_response_rss.xml @@ -9,7 +9,7 @@ {{ number_of_results }} 1 {{ number_of_results }} -