on master help sign in
[fix] opensearch image issue - closes #507
bc81edaAdam Tauber
searx/templates/courgette/opensearch.xml+1−1
@@ -3,7 +3,7 @@
3 <ShortName>{{ instance_name }}</ShortName>
3 <ShortName>{{ instance_name }}</ShortName>
4 <Description>a privacy-respecting, hackable metasearch engine</Description>
4 <Description>a privacy-respecting, hackable metasearch engine</Description>
5 <InputEncoding>UTF-8</InputEncoding>
5 <InputEncoding>UTF-8</InputEncoding>
6− <Image>{{ host }}{{ url_for('static', filename='img/favicon.png') | replace("/", "", 1) }}</Image>
6+ <Image>{{ urljoin(host, url_for('static', filename='img/favicon.png')) }}</Image>
7 <LongName>searx metasearch</LongName>
7 <LongName>searx metasearch</LongName>
8 {% if opensearch_method == 'get' %}
8 {% if opensearch_method == 'get' %}
9 <Url type="text/html" method="get" template="{{ host }}search?q={searchTerms}"/>
9 <Url type="text/html" method="get" template="{{ host }}search?q={searchTerms}"/>
searx/templates/default/opensearch.xml+1−1
@@ -3,7 +3,7 @@
3 <ShortName>{{ instance_name }}</ShortName>
3 <ShortName>{{ instance_name }}</ShortName>
4 <Description>a privacy-respecting, hackable metasearch engine</Description>
4 <Description>a privacy-respecting, hackable metasearch engine</Description>
5 <InputEncoding>UTF-8</InputEncoding>
5 <InputEncoding>UTF-8</InputEncoding>
6− <Image>{{ host }}{{ url_for('static', filename='img/favicon.png') | replace("/", "", 1) }}</Image>
6+ <Image>{{ urljoin(host, url_for('static', filename='img/favicon.png')) }}</Image>
7 <LongName>searx metasearch</LongName>
7 <LongName>searx metasearch</LongName>
8 {% if opensearch_method == 'get' %}
8 {% if opensearch_method == 'get' %}
9 <Url type="text/html" method="get" template="{{ host }}search?q={searchTerms}"/>
9 <Url type="text/html" method="get" template="{{ host }}search?q={searchTerms}"/>
searx/templates/oscar/opensearch.xml+1−1
@@ -3,7 +3,7 @@
3 <ShortName>{{ instance_name }}</ShortName>
3 <ShortName>{{ instance_name }}</ShortName>
4 <Description>a privacy-respecting, hackable metasearch engine</Description>
4 <Description>a privacy-respecting, hackable metasearch engine</Description>
5 <InputEncoding>UTF-8</InputEncoding>
5 <InputEncoding>UTF-8</InputEncoding>
6− <Image>{{ host }}{{ url_for('static', filename='img/favicon.png') | replace("/", "", 1) }}</Image>
6+ <Image>{{ urljoin(host, url_for('static', filename='img/favicon.png')) }}</Image>
7 <LongName>searx metasearch</LongName>
7 <LongName>searx metasearch</LongName>
8 {% if opensearch_method == 'get' %}
8 {% if opensearch_method == 'get' %}
9 <Url type="text/html" method="get" template="{{ host }}search?q={searchTerms}"/>
9 <Url type="text/html" method="get" template="{{ host }}search?q={searchTerms}"/>
searx/webapp.py+2−1
@@ -749,7 +749,8 @@ def opensearch():
749
749
750 ret = render('opensearch.xml',
750 ret = render('opensearch.xml',
751 opensearch_method=method,
751 opensearch_method=method,
752− host=get_base_url())
752+ host=get_base_url(),
753+ urljoin=urljoin)
753
754
754 resp = Response(response=ret,
755 resp = Response(response=ret,
755 status=200,
756 status=200,