From 0724b696a9ae63b3825f18d11cdd95e743b9cf26 Mon Sep 17 00:00:00 2001 From: Mike Tschudi Date: Mon, 20 Nov 2023 13:15:19 -0800 Subject: [PATCH] Encoded detemplatized portal urls in storymaps #1299 --- packages/storymap/src/helpers/create-storymap.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/storymap/src/helpers/create-storymap.ts b/packages/storymap/src/helpers/create-storymap.ts index 6030f4b51..b093b5668 100644 --- a/packages/storymap/src/helpers/create-storymap.ts +++ b/packages/storymap/src/helpers/create-storymap.ts @@ -51,6 +51,9 @@ export function createStoryMap( // that we have to generate from the passed in model const resources: any[] = []; + // The data section has been de-templatized. Some entries need to be encoded URLs, so we'll find and encode them. + model.data = JSON.parse(JSON.stringify(model.data).replace(/portalUrl=https:\/\//g, "portalUrl=https%3A%2F%2F")); + // For unknown reasons we can not seem to spy on createItemInFolder // so we will create-then-move for now const createOptions: ICreateItemOptions = {