mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
closes #737
This commit is contained in:
@@ -102,6 +102,7 @@
|
||||
str = XRegExp.replace(str, invalidChars, '-');
|
||||
str = str.replace(/\s+/g, '-') // collapse whitespace and replace by -
|
||||
str = str.replace(/-+/g, '-'); // collapse dashes
|
||||
str = str.replace(/-$/g, '');
|
||||
|
||||
return str;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user