mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
tweaking slugify code to not remove numbers
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user