summaryrefslogtreecommitdiff
path: root/searx/webutils.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/webutils.py
parentfd5fe369844e481aecc0d731b08ee8b29c9b47e6 (diff)
[mod] preferences.py: check language setting with a regex instead of match_language
Diffstat (limited to 'searx/webutils.py')
-rw-r--r--searx/webutils.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/searx/webutils.py b/searx/webutils.py
index 2900c0edd..6dd0243d8 100644
--- a/searx/webutils.py
+++ b/searx/webutils.py
@@ -11,6 +11,8 @@ from codecs import getincrementalencoder
from searx import logger
+VALID_LANGUAGE_CODE = re.compile(r'^[a-z]{2,3}(-[a-zA-Z]{2})?$')
+
logger = logger.getChild('webutils')