From 3b0f9c07b2f007b0767787da80b49827f752f528 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Thu, 11 Aug 2022 18:37:12 +0200 Subject: [fix] improve OpenSearch description Some HTTP-Clients do have issues with the ``opensearch.xml`` from SearXNG (related [1][2]) while other OpenSearch descriptions[3] (e.g. from qwant) work flawles. Inspired by the OpenSearch description from qwant and with informations from the specification[4] the ``opensearch.xml`` has been *improved*. - convert `` methods from lower case to upper case (`POST`|`GET`) - add `` and `xmlns:moz="http://www.mozilla.org/2006/browser/search/"` - add `` [4] OpenSearch description documents should include at least one Query element of `role="example"` that is expected to return search results. Search clients may use this example query to validate that the search engine is working properly. - modified `` to SearXNG - modified `` the word 'hackable' scares uninitiated users and was removed - add the `type="image/png"` to `` Test can be done by:: make run Visit http://127.0.0.1:8888/ and add the search engine to your WEB-Browser / test with different WEB-Browser from desktop and Smartphones (are there any iOS user here, please test on Safari and Chrome). [1] https://app.element.io/#/room/#searxng:matrix.org/$xN_abdKhNqUlgXRBrb_9F3pqOxnSzGQ1TG0s0G9hQVw [2] https://github.com/searxng/searxng/issues/431 [3] https://developer.mozilla.org/en-US/docs/Web/OpenSearch [4] https://github.com/dewitt/opensearch/blob/master/opensearch-1-1-draft-6.md#the-query-element Signed-off-by: Markus Heiser --- searx/templates/simple/opensearch.xml | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'searx/templates') diff --git a/searx/templates/simple/opensearch.xml b/searx/templates/simple/opensearch.xml index 230f327a5..212cecc80 100644 --- a/searx/templates/simple/opensearch.xml +++ b/searx/templates/simple/opensearch.xml @@ -1,22 +1,21 @@ - + {{ instance_name }} - a privacy-respecting, hackable metasearch engine + SearXNG metasearch + SearXNG is a metasearch engine that respects your privacy. UTF-8 - {{ url_for('static', filename='img/favicon.png', _external=True) }} - searx metasearch - {% if opensearch_method == 'get' %} - + {{ url_for('static', filename='img/favicon.png', _external=True) }} + {% if opensearch_method == 'GET' %} + {% else %} - - - + + + {% endif %} {% if autocomplete %} - + {% endif %} - - + + + {{ url_for('search', _external=True) }} -- cgit v1.2.3