From a7dabe421684e6cb2f2abce659d60fa3bb1bb71b Mon Sep 17 00:00:00 2001 From: Krzysztof Urbaniak Date: Fri, 28 Oct 2016 11:36:53 +0200 Subject: [1.10.x] Fixed #27063 -- Prevented i18n_patterns() from using too much of the URL as the language. Backport of a01d887a3ad9029ed198b6af974534fec46223f9 from master --- django/utils/translation/trans_real.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django/utils') 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) -- cgit v1.3