Skip to content

Commit

Permalink
[fix] re-add opensearch_url / its used in based.html
Browse files Browse the repository at this point in the history
The URL was accidentally deleted in a85907a, 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 <[email protected]>
  • Loading branch information
return42 committed Feb 25, 2024
1 parent e8bd6c0 commit c0b97c6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions searx/webapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c0b97c6

Please sign in to comment.