summaryrefslogtreecommitdiff
path: root/searx/webapp.py
diff options
context:
space:
mode:
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