tempaltes - sanitize url - replace spaces gloablly

This commit is contained in:
Michael Shanks 2020-10-16 23:41:31 +01:00
parent 1a8c2907ca
commit 580e7938ff
1 changed files with 1 additions and 1 deletions

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()