summaryrefslogtreecommitdiff
path: root/django/utils/text.py
diff options
context:
space:
mode:
authorSjbrgsn <chsnot@gmail.com>2019-12-21 11:45:54 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-12-30 20:47:22 +0100
commitb2bd08bb7a912a1504f5fb5018f5317e6b5423cd (patch)
treec481e9b848b285755f872554ed0b828e5256aee9 /django/utils/text.py
parentcf5d4701dc12ad69d51042b0d7e81e4a54de4bd7 (diff)
downloaddjango-b2bd08bb7a912a1504f5fb5018f5317e6b5423cd.tar.gz
Fixed #30892 -- Fixed slugify() and admin's URLify.js for "İ".
Thanks Luis Nell for the implementation idea and very detailed report. Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Diffstat (limited to 'django/utils/text.py')
-rw-r--r--django/utils/text.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/text.py b/django/utils/text.py
index 5e1409116e..110e088ddf 100644
--- a/django/utils/text.py
+++ b/django/utils/text.py
@@ -402,7 +402,7 @@ def slugify(value, allow_unicode=False):
value = unicodedata.normalize('NFKC', value)
else:
value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore').decode('ascii')
- value = re.sub(r'[^\w\s-]', '', value).strip().lower()
+ value = re.sub(r'[^\w\s-]', '', value.lower()).strip()
return re.sub(r'[-\s]+', '-', value)