mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-07 14:35:47 +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/
|
//http://dense13.com/blog/2009/05/03/converting-string-to-slug-javascript/
|
||||||
slugify: function(str) {
|
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.replace(/^\s+|\s+$/g, ''); // trim
|
||||||
str = str.toLowerCase();
|
str = str.toLowerCase();
|
||||||
|
|||||||
Reference in New Issue
Block a user