Browse Source

Trim slugs before passing them to django slugify

Rafał Pitoń 10 years ago
parent
commit
3d8f361b30
1 changed files with 1 additions and 1 deletions
  1. 1 1
      misago/core/utils.py

+ 1 - 1
misago/core/utils.py

@@ -13,7 +13,7 @@ from django.utils.translation import ugettext_lazy as _, ungettext_lazy
 def slugify(string):
     string = unicode(string)
     string = unidecode(string)
-    return django_slugify(string.replace('_', ' '))
+    return django_slugify(string.replace('_', ' ').strip())
 
 
 """