diff options
| author | Alexandre Flament <alex@al-f.net> | 2020-10-04 09:05:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-04 09:05:14 +0200 |
| commit | e2cd9b65bb2b2e1f1085cf48442632da0d52077e (patch) | |
| tree | 0e07d566d6450632bc798d803d4a92916004ff02 /searx/webutils.py | |
| parent | 53c8d945b489b1185d89e02bbc6b6ea6b60a91da (diff) | |
| parent | 507896c1159ae72dc1e45a4d0cf40f4654209ec0 (diff) | |
Merge pull request #2239 from dalf/mod-preferences
[mod] preferences.py: check language setting with a regex instead of match_language
Diffstat (limited to 'searx/webutils.py')
| -rw-r--r-- | searx/webutils.py | 2 |
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') |