diff --git a/src/mfm/to-html.ts b/src/mfm/to-html.ts
index ab3f7c3d16..c09272caad 100644
--- a/src/mfm/to-html.ts
+++ b/src/mfm/to-html.ts
@@ -52,7 +52,7 @@ export function toHtml(tokens: MfmForest | null, mentionedRemoteUsers: IMentione
blockCode(token) {
const pre = doc.createElement('pre');
const inner = doc.createElement('code');
- inner.innerHTML = token.node.props.code;
+ inner.textContent = token.node.props.code;
pre.appendChild(inner);
return pre;
},