{"ScriptPreparationCode":"function replaceAllWithShortcut(str) {\r\n return !(/[\u003C\u003E\u0026\u0022\u0027]/.test(str)) ? str :\r\n str.replaceAll(\u0027\u0026\u0027, \u0027\u0026amp;\u0027).replaceAll(\u0027\u003C\u0027, \u0027\u0026lt;\u0027)\r\n .replaceAll(\u0027\u003E\u0027, \u0027\u0026gt;\u0027).replaceAll(\u0027\u0022\u0027, \u0027\u0026quot;\u0027);\r\n}\r\n\r\nconst cachedElementParent = document.createElement(\u0027div\u0027);\r\nconst cachedChildTextNode = document.createTextNode(\u0027\u0027);\r\ncachedElementParent.appendChild(cachedChildTextNode);\r\n\r\nfunction serializeTextNode(text) {\r\n cachedChildTextNode.nodeValue = text;\r\n return cachedElementParent.innerHTML;\r\n}","TestCases":[{"Name":"replaceAllWithShortcut","Code":"replaceAllWithShortcut(\u0022hello \u003Cb\u003Eworld\u003C/b\u003E\u0022)","IsDeferred":false},{"Name":"serializeTextNode","Code":"serializeTextNode(\u0022hello \u003Cb\u003Eworld\u003C/b\u003E\u0022)","IsDeferred":false},{"Name":"replaceAllWithShortcut no tags","Code":"replaceAllWithShortcut(\u0022hello world\u0022)","IsDeferred":false}]}