From 084e064dff8e3bb38877811853a6cb4d3862eaf0 Mon Sep 17 00:00:00 2001 From: Michael Shanks Date: Fri, 16 Oct 2020 23:41:31 +0100 Subject: [PATCH] tempaltes - sanitize url - replace spaces gloablly --- .../src/builderStore/store/screenTemplates/sanitizeUrl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/builderStore/store/screenTemplates/sanitizeUrl.js b/packages/builder/src/builderStore/store/screenTemplates/sanitizeUrl.js index eab985c0a5..96b7633e41 100644 --- a/packages/builder/src/builderStore/store/screenTemplates/sanitizeUrl.js +++ b/packages/builder/src/builderStore/store/screenTemplates/sanitizeUrl.js @@ -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()