diff --git a/server/lib/client-html.ts b/server/lib/client-html.ts index 3b0a68f4d..3529acf5e 100644 --- a/server/lib/client-html.ts +++ b/server/lib/client-html.ts @@ -382,8 +382,9 @@ class ClientHtml { } private static addServerConfig (htmlStringPage: string, serverConfig: HTMLServerConfig) { - const serverConfigString = JSON.stringify(serverConfig) - const configScriptTag = `` + // Stringify the JSON object, and then stringify the string object so we can inject it into the HTML + const serverConfigString = JSON.stringify(JSON.stringify(serverConfig)) + const configScriptTag = `` return htmlStringPage.replace(CUSTOM_HTML_TAG_COMMENTS.SERVER_CONFIG, configScriptTag) }