diff options
| author | Krzysztof Urbaniak <urban@fail.pl> | 2016-10-28 11:36:53 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-10-31 14:33:42 -0400 |
| commit | a7dabe421684e6cb2f2abce659d60fa3bb1bb71b (patch) | |
| tree | 6d73c86b0c7f8500120ccd6e6513829baebc4bc1 /django/utils | |
| parent | 62c9894b347999bf44417ee6ab31e1a66628cf36 (diff) | |
[1.10.x] Fixed #27063 -- Prevented i18n_patterns() from using too much of the URL as the language.
Backport of a01d887a3ad9029ed198b6af974534fec46223f9 from master
Diffstat (limited to 'django/utils')
| -rw-r--r-- | django/utils/translation/trans_real.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/translation/trans_real.py b/django/utils/translation/trans_real.py index 7a2a1c63a2..ad4d521590 100644 --- a/django/utils/translation/trans_real.py +++ b/django/utils/translation/trans_real.py @@ -48,7 +48,7 @@ language_code_re = re.compile( re.IGNORECASE ) -language_code_prefix_re = re.compile(r'^/([\w@-]+)(/|$)') +language_code_prefix_re = re.compile(r'^/(\w+([@-]\w+)?)(/|$)') @receiver(setting_changed) |
