summaryrefslogtreecommitdiff
path: root/searx/webapp.py
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2024-02-25 18:15:34 +0100
committerMarkus Heiser <markus.heiser@darmarIT.de>2024-02-25 18:26:16 +0100
commitc0b97c65438be44dd5f5e64786576763993ce424 (patch)
treed28f7d9b6c64a1cf5e90b10a688c1e6135ac4ce8 /searx/webapp.py
parente8bd6c03bf3d99d0ec5b87e5028d77a106fb01b2 (diff)
downloadsearxng-c0b97c65438be44dd5f5e64786576763993ce424.tar.gz
searxng-c0b97c65438be44dd5f5e64786576763993ce424.zip
[fix] re-add opensearch_url / its used in based.html
The URL was accidentally deleted in a85907a98, but is still required in base.html for auto-discovery / from base.html:: <link title="{{ instance_name }}" type="application/opensearchdescription+xml" rel="search" href="{{ opensearch_url }}" /> Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/webapp.py')
-rwxr-xr-xsearx/webapp.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/searx/webapp.py b/searx/webapp.py
index 9672db3ab..c64ef0fc0 100755
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -438,6 +438,16 @@ def render(template_name: str, **kwargs):
kwargs['cache_url'] = settings['ui']['cache_url']
kwargs['get_result_template'] = get_result_template
kwargs['doi_resolver'] = get_doi_resolver(request.preferences)
+ kwargs['opensearch_url'] = (
+ url_for('opensearch')
+ + '?'
+ + urlencode(
+ {
+ 'method': request.preferences.get_value('method'),
+ 'autocomplete': request.preferences.get_value('autocomplete'),
+ }
+ )
+ )
kwargs['urlparse'] = urlparse
# scripts from plugins