{"ScriptPreparationCode":"const HTMLRegex = /[\u0026\u003C\u003E\u0022\u0027\u0060]/g;\r\nconst HTMLTable = {\r\n \u0022\u0026\u0022: \u0022\u0026amp;\u0022,\r\n \u0022\u003C\u0022: \u0022\u0026lt;\u0022,\r\n \u0022\u003E\u0022: \u0022\u0026gt;\u0022,\r\n \u0027\u0022\u0027: \u0022\u0026quot;\u0022,\r\n \u0022\u0027\u0022: \u0022\u0026#039;\u0022,\r\n \u0022\u0060\u0022: \u0022\u0026#96;\u0022,\r\n};\r\n\r\nfunction sanitizeTable(text) {\r\n return text.replace(HTMLRegex, (match) =\u003E HTMLTable[match]);\r\n};\r\n\r\nfunction sanitizeChain(text) {\r\n return text\r\n .replace(/\u0026/g, \u0022\u0026amp;\u0022)\r\n .replace(/\u003C/g, \u0022\u0026lt;\u0022)\r\n .replace(/\u003E/g, \u0022\u0026gt;\u0022)\r\n .replace(/\u0022/g, \u0022\u0026quot;\u0022)\r\n .replace(/\u0027/g, \u0022\u0026#039;\u0022)\r\n .replace(/\u0060/g, \u0022\u0026#96;\u0022);\r\n}\r\n","TestCases":[{"Name":"chain","Code":"sanitizeChain(\u0060\u003Cdiv attr=\u0022\u0027value\u0026\u0027\u0022\u003E\u003C/div\u003E\u0060);","IsDeferred":false},{"Name":"table","Code":"sanitizeTable(\u0060\u003Cdiv attr=\u0022\u0027value\u0026\u0027\u0022\u003E\u003C/div\u003E\u0060);","IsDeferred":false}]}