summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2020-03-21 18:46:26 +0100
committerMarkus Heiser <markus.heiser@darmarit.de>2020-03-21 18:46:26 +0100
commitbaddb8d3eb856344129fb4b320bd17bba9456477 (patch)
tree8c84d6b38f138e3c6c0f8c7297c0cf02c84f4fa2
parent2d956696e94e5639db6e12648442989919c48c22 (diff)
parent822aee94a2e50923252faf7ae11b4b03017c1a1a (diff)
downloadsearxng-baddb8d3eb856344129fb4b320bd17bba9456477.tar.gz
searxng-baddb8d3eb856344129fb4b320bd17bba9456477.zip
Merge branch 'master' of https://github.com/asciimoo/searx into filtron
-rw-r--r--searx/webapp.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/searx/webapp.py b/searx/webapp.py
index 0c5ed4570..b3928921e 100644
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -178,9 +178,12 @@ flask_babel.get_translations = _get_translations
def _get_browser_language(request, lang_list):
for lang in request.headers.get("Accept-Language", "en").split(","):
+ if ';' in lang:
+ lang = lang.split(';')[0]
locale = match_language(lang, lang_list, fallback=None)
if locale is not None:
return locale
+ return settings['search']['default_lang'] or 'en'
@babel.localeselector
@@ -647,7 +650,6 @@ def index():
response.headers.add('Content-Disposition', cont_disp)
return response
elif output_format == 'rss':
- print(results)
response_rss = render(
'opensearch_response_rss.xml',
results=results,