From d4629ea8eb9fced5c5f442de64b118eb16b1aa06 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Tue, 10 Nov 2020 21:00:14 +0900 Subject: [PATCH] Fix toHtml (#6824) --- src/mfm/to-html.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mfm/to-html.ts b/src/mfm/to-html.ts index ab3f7c3d1..c09272caa 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; },