Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[py3] Fixed slugify filter

  • Loading branch information...
commit 2d2dca2d8e8f2b7f05f90594a291a2c78fe828d0 1 parent 5d01f3c
Claude Paroz authored August 15, 2012

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  django/template/defaultfilters.py
4  django/template/defaultfilters.py
@@ -234,8 +234,8 @@ def slugify(value):
234 234
     Normalizes string, converts to lowercase, removes non-alpha characters,
235 235
     and converts spaces to hyphens.
236 236
     """
237  
-    value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore')
238  
-    value = six.text_type(re.sub('[^\w\s-]', '', value).strip().lower())
  237
+    value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore').decode()
  238
+    value = re.sub('[^\w\s-]', '', value).strip().lower()
239 239
     return mark_safe(re.sub('[-\s]+', '-', value))
240 240
 
241 241
 @register.filter(is_safe=True)

0 notes on commit 2d2dca2

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