Skip to content
Browse files

[py3] Fixed slugify filter

  • Loading branch information...
1 parent 5d01f3c commit 2d2dca2d8e8f2b7f05f90594a291a2c78fe828d0 @claudep claudep committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/template/defaultfilters.py
View
4 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)

0 comments on commit 2d2dca2

Please sign in to comment.
Something went wrong with that request. Please try again.