diff --git a/searx/templates/__common__/opensearch.xml b/searx/templates/__common__/opensearch.xml
index 244e10132..e76a14aff 100644
--- a/searx/templates/__common__/opensearch.xml
+++ b/searx/templates/__common__/opensearch.xml
@@ -15,4 +15,8 @@
{% if autocomplete %}
{% endif %}
+
+
diff --git a/searx/templates/__common__/opensearch_response_rss.xml b/searx/templates/__common__/opensearch_response_rss.xml
index 3781dd87c..686443c49 100644
--- a/searx/templates/__common__/opensearch_response_rss.xml
+++ b/searx/templates/__common__/opensearch_response_rss.xml
@@ -9,7 +9,7 @@
{{ number_of_results }}
1
{{ number_of_results }}
-
+
{% if error_message %}
-
diff --git a/searx/templates/courgette/base.html b/searx/templates/courgette/base.html
index f4c61dac2..468b817c5 100644
--- a/searx/templates/courgette/base.html
+++ b/searx/templates/courgette/base.html
@@ -22,7 +22,7 @@
{% endblock %}
{% block meta %}{% endblock %}
{% block head %}
-
+
{% endblock %}
{% block head %}
-
+
{% endblock %}
diff --git a/searx/webapp.py b/searx/webapp.py
index c19d3f3cc..15baf2bdc 100755
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -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)