summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--django/template/defaultfilters.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/template/defaultfilters.py b/django/template/defaultfilters.py
index 16801fd573..628b6627d2 100644
--- a/django/template/defaultfilters.py
+++ b/django/template/defaultfilters.py
@@ -234,8 +234,8 @@ def slugify(value):
Normalizes string, converts to lowercase, removes non-alpha characters,
and converts spaces to hyphens.
"""
- value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore')
- value = six.text_type(re.sub('[^\w\s-]', '', value).strip().lower())
+ value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore').decode()
+ value = re.sub('[^\w\s-]', '', value).strip().lower()
return mark_safe(re.sub('[-\s]+', '-', value))
@register.filter(is_safe=True)