Skip to content

Commit 83ac4d9

Browse files
committed
Removed special chars from urlcode
1 parent eae00bc commit 83ac4d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* @return {string}
55
*/
66
const generateUrlCode = (str) => {
7-
return encodeURI(str.toLowerCase().replace(/ /g, '-'))
7+
return encodeURI(str.toLowerCase().replace(/[^a-zA-Z0-9 ]/g, '').replace(/ /g, '-'))
88
}
99

1010
module.exports = {

0 commit comments

Comments
 (0)