tempaltes - sanitize url - replace spaces gloablly
This commit is contained in:
parent
1a8c2907ca
commit
580e7938ff
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue