From 571ce9ff07e9f8522ad4e770699f8347ba8935f2 Mon Sep 17 00:00:00 2001 From: Marc Abonce Seguin Date: Sat, 9 Jan 2021 22:11:41 -0700 Subject: fix empty colon in query from selecting Chinese --- searx/query.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'searx/query.py') diff --git a/searx/query.py b/searx/query.py index e61e24f2c..38cb03ffe 100644 --- a/searx/query.py +++ b/searx/query.py @@ -77,7 +77,7 @@ class RawTextQuery: pass # this force a language - if query_part[0] == ':': + if query_part[0] == ':' and len(query_part) > 1: lang = query_part[1:].lower().replace('_', '-') # check if any language-code is equal with -- cgit v1.2.3