Permalink
Browse files

Fixed #700 -- urlify.js now uses hyphens instead of underscores

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1017 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent e7c870c commit c6f375fd1124562cde131c9785e7d7f6771ef7f2 @adrianholovaty adrianholovaty committed Oct 28, 2005
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/contrib/admin/media/js/urlify.js
View
2 django/contrib/admin/media/js/urlify.js
@@ -9,7 +9,7 @@ function URLify(s, num_chars) {
s = s.replace(r, '');
s = s.replace(/[^\w\s-]/g, ''); // remove unneeded chars
s = s.replace(/^\s+|\s+$/g, ''); // trim leading/trailing spaces
- s = s.replace(/\s+/g, '_'); // convert spaces to underscores
+ s = s.replace(/\s+/g, '-'); // convert spaces to hyphens
s = s.toLowerCase(); // convert to lowercase
return s.substring(0, num_chars);// trim to first num_chars chars
}

0 comments on commit c6f375f

Please sign in to comment.