diff --git a/client/src/utils/utils.ts b/client/src/utils/utils.ts index 717208ffe4d..d176c148a27 100644 --- a/client/src/utils/utils.ts +++ b/client/src/utils/utils.ts @@ -275,7 +275,7 @@ export function appendScriptStyle(data: Readonly<{ script?: string; styles?: str if (data.script && data.script !== "") { const tag = document.createElement("script"); tag.type = "text/javascript"; - tag.textContent = `(function(){${data.script}})();`; + tag.textContent = `(function(){\n${data.script}\n})();`; document.head.appendChild(tag); } // create a style tag inside head tag