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