tweaking slugify code to not remove numbers

This commit is contained in:
Julian Lam
2013-12-31 14:46:28 -05:00
parent a974c6fa99
commit c19a51e1b6

View File

@@ -93,7 +93,7 @@
//http://dense13.com/blog/2009/05/03/converting-string-to-slug-javascript/
slugify: function(str) {
var invalidChars = XRegExp('[^\\p{L} -]', 'g');
var invalidChars = XRegExp('[^\\p{L} 0-9\-]', 'g');
str = str.replace(/^\s+|\s+$/g, ''); // trim
str = str.toLowerCase();