From 363b753306d10d6949165fdef27e4eedaf4b1193 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Wed, 24 Feb 2021 13:40:37 +0100 Subject: [PATCH] Avoid innerHTML MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/components/views/messages/TextualBody.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/messages/TextualBody.js b/src/components/views/messages/TextualBody.js index 63d287870e..e60ab5b535 100644 --- a/src/components/views/messages/TextualBody.js +++ b/src/components/views/messages/TextualBody.js @@ -134,7 +134,7 @@ export default class TextualBody extends React.Component { _addCodeElement(pre) { const code = document.createElement("code"); - code.innerHTML = pre.innerHTML; + code.append(...pre.childNodes); pre.innerHTML = ""; pre.appendChild(code); }