Skip to content

Commit 7a4a648

Browse files
author
Sagette Alexandre
committed
escape '/' character
1 parent eff9ecc commit 7a4a648

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

angular-slugify.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
// Unicode (non-control) characters in the Latin-1 Supplement and Latin
3131
// Extended-A blocks, transliterated into ASCII characters.
3232
var charmap = {
33+
'/': " ",
3334
' ': " ",
3435
'¡': "!",
3536
'¢': "c",
@@ -262,7 +263,7 @@
262263
}
263264
}
264265
s = ascii.join("");
265-
s = s.replace(/[^\w\s-]/g, "").trim().toLowerCase();
266+
s = s.replace(/[^\w\s-/]/g, "").trim().toLowerCase();
266267
return s.replace(/[-\s]+/g, "-");
267268
}
268269

0 commit comments

Comments
 (0)