mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 08:55:47 +01:00
so xregexp uses double backslashes...
This commit is contained in:
@@ -95,7 +95,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} 0-9\-_]', 'g');
|
var invalidChars = XRegExp('[^\\p{L}\\s\\d\\-_]', '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