Avoid innerHTML
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
ce1be7a4cd
commit
363b753306
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue