forked from Icycoide/searxng
[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
This commit is contained in:
parent
584760cf54
commit
bfdad7bc0f
7 changed files with 12 additions and 5 deletions
|
@ -386,6 +386,9 @@ def render(template_name, override_theme=None, **kwargs):
|
|||
|
||||
kwargs['proxify'] = proxify if settings.get('result_proxy', {}).get('url') else None
|
||||
|
||||
kwargs['opensearch_url'] = url_for('opensearch') + '?' \
|
||||
+ urlencode({'method': kwargs['method'], 'autocomplete': kwargs['autocomplete']})
|
||||
|
||||
kwargs['get_result_template'] = get_result_template
|
||||
|
||||
kwargs['theme'] = get_current_theme_name(override=override_theme)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue