mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
allow underscores in slugs
This commit is contained in:
@@ -95,7 +95,7 @@
|
||||
|
||||
//http://dense13.com/blog/2009/05/03/converting-string-to-slug-javascript/
|
||||
slugify: function(str) {
|
||||
var invalidChars = XRegExp('[^\\p{L} 0-9\-]', '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