Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[py3] Fixed slugify filter

  • Loading branch information...
commit 2d2dca2d8e8f2b7f05f90594a291a2c78fe828d0 1 parent 5d01f3c
@claudep claudep authored
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)
Please sign in to comment.
Something went wrong with that request. Please try again.