From ed46c1486c2296315d080437b240be363b397a01 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 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; },