From 507896c1159ae72dc1e45a4d0cf40f4654209ec0 Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Thu, 1 Oct 2020 11:29:31 +0200 Subject: [mod] preferences.py: check language setting with a regex instead of match_language --- searx/webutils.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'searx/webutils.py') 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') -- cgit v1.2.3