Avoid innerHTML

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
pull/21833/head
Šimon Brandner 2021-02-24 13:40:37 +01:00
parent ce1be7a4cd
commit 363b753306
No known key found for this signature in database
GPG Key ID: 9760693FDD98A790
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}