Avoid innerHTML

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Š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

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