diff --git a/public/src/utils.js b/public/src/utils.js index 67a5aed47d..8f6e51d59d 100644 --- a/public/src/utils.js +++ b/public/src/utils.js @@ -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; },