summaryrefslogtreecommitdiff
path: root/searx/query.py
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2020-10-01 11:29:31 +0200
committerAlexandre Flament <alex@al-f.net>2020-10-01 11:29:31 +0200
commit507896c1159ae72dc1e45a4d0cf40f4654209ec0 (patch)
tree28b991a13f5ce9b562c33d6c4554834911dde083 /searx/query.py
parentfd5fe369844e481aecc0d731b08ee8b29c9b47e6 (diff)
downloadsearxng-507896c1159ae72dc1e45a4d0cf40f4654209ec0.tar.gz
searxng-507896c1159ae72dc1e45a4d0cf40f4654209ec0.zip
[mod] preferences.py: check language setting with a regex instead of match_language
Diffstat (limited to 'searx/query.py')
-rw-r--r--searx/query.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/searx/query.py b/searx/query.py
index 2d5a72bcb..a9f343944 100644
--- a/searx/query.py
+++ b/searx/query.py
@@ -22,9 +22,7 @@ import re
from searx.languages import language_codes
from searx.engines import categories, engines, engine_shortcuts
from searx.search import EngineRef
-
-
-VALID_LANGUAGE_CODE = re.compile(r'^[a-z]{2,3}(-[a-zA-Z]{2})?$')
+from searx.webutils import VALID_LANGUAGE_CODE
class RawTextQuery: