strips extra hiphens from channel url

Этот коммит содержится в:
Girish S
2015-10-26 14:48:00 +05:30
родитель ae2898107d
Коммит 5d25e55254

Просмотреть файл

@@ -20,6 +20,7 @@ export function isEmail(email) {
export function cleanUpUrlable(input) {
var cleaned = input.trim().replace(/-/g, ' ').replace(/[^\w\s]/gi, '').toLowerCase().replace(/\s/g, '-');
cleaned = cleaned.replace(/-{2,}/, '-');
cleaned = cleaned.replace(/^\-+/, '');
cleaned = cleaned.replace(/\-+$/, '');
return cleaned;