From c19a51e1b6379e910b08034083a6acc3eae2d072 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 31 Dec 2013 14:46:28 -0500 Subject: [PATCH] tweaking slugify code to not remove numbers --- public/src/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/src/utils.js b/public/src/utils.js index cfc9f5208f..2fa9d047fa 100644 --- a/public/src/utils.js +++ b/public/src/utils.js @@ -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();