From 8ceac926e3be2b86c963f1456d469afa5228fbc7 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Sat, 17 Sep 2022 11:19:45 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E8=A1=8C=E7=BA=A7=E5=85=83?= =?UTF-8?q?=E7=B4=A0=E6=94=AF=E6=8C=81=E5=A4=9A=E9=87=8D=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=20https://github.com/siyuan-note/siyuan/issu?= =?UTF-8?q?es/2911?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/treenode/node.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/treenode/node.go b/kernel/treenode/node.go index a574ab3e6..c5cf108af 100644 --- a/kernel/treenode/node.go +++ b/kernel/treenode/node.go @@ -114,10 +114,10 @@ func NestedInlines2FlattedSpans(tree *parse.Tree) { } if entering { - span = &ast.Node{Type: ast.NodeTextMark, TextMarkType: strings.Join(tags, " "), TextMarkTextContent: string(n.Tokens)} + span = &ast.Node{Type: ast.NodeTextMark, TextMarkType: strings.Join(tags, " "), TextMarkTextContent: string(html.EscapeHTML(n.Tokens))} if ast.NodeInlineMathContent == n.Type { span.TextMarkTextContent = "" - span.TextMarkInlineMathContent = string(n.Tokens) + span.TextMarkInlineMathContent = string(html.EscapeHTML(n.Tokens)) } if ast.NodeLinkText == n.Type && !n.ParentIs(ast.NodeImage) { var link *ast.Node