1
0
Fork 0
mirror of synced 2024-09-30 17:18:14 +13:00

tempaltes - sanitize url - replace spaces gloablly

This commit is contained in:
Michael Shanks 2020-10-16 23:41:31 +01:00
parent 492c45f169
commit 084e064dff

View file

@ -4,7 +4,7 @@ export default function(url) {
.map(part => {
// if parameter, then use as is
if (part.startsWith(":")) return part
return encodeURIComponent(part.replace(" ", "-"))
return encodeURIComponent(part.replace(/ /g, "-"))
})
.join("/")
.toLowerCase()