diff options
| author | Ad Timmering <awtimmering@gmail.com> | 2021-11-26 10:44:54 +0900 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-01-07 12:25:06 +0100 |
| commit | bdf3e156b4b47d45b8e37823164b598afc533ce0 (patch) | |
| tree | e27b8a05d1fe76478e06e5114a4f4aa86a5942ab /django/utils/translation | |
| parent | fe76944269c13d59f8bb3bc1cfff7ab6443777e4 (diff) | |
Fixed #28628 -- Changed \d to [0-9] in regexes where appropriate.
Diffstat (limited to 'django/utils/translation')
| -rw-r--r-- | django/utils/translation/trans_real.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/django/utils/translation/trans_real.py b/django/utils/translation/trans_real.py index 7c20f5f32b..7a6bc81406 100644 --- a/django/utils/translation/trans_real.py +++ b/django/utils/translation/trans_real.py @@ -33,9 +33,9 @@ CONTEXT_SEPARATOR = "\x04" # Format of Accept-Language header values. From RFC 2616, section 14.4 and 3.9 # and RFC 3066, section 2.1 accept_language_re = _lazy_re_compile(r''' - ([A-Za-z]{1,8}(?:-[A-Za-z0-9]{1,8})*|\*) # "en", "en-au", "x-y-z", "es-419", "*" - (?:\s*;\s*q=(0(?:\.\d{,3})?|1(?:\.0{,3})?))? # Optional "q=1.00", "q=0.8" - (?:\s*,\s*|$) # Multiple accepts per header. + ([A-Za-z]{1,8}(?:-[A-Za-z0-9]{1,8})*|\*) # "en", "en-au", "x-y-z", "es-419", "*" + (?:\s*;\s*q=(0(?:\.[0-9]{,3})?|1(?:\.0{,3})?))? # Optional "q=1.00", "q=0.8" + (?:\s*,\s*|$) # Multiple accepts per header. ''', re.VERBOSE) language_code_re = _lazy_re_compile( |
