From 0cde449b454558262754b271fd7ce9fe8987c483 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Tue, 14 Mar 2023 15:08:12 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E5=9D=97=E5=BC=95=E9=94=9A=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E5=AF=BC=E5=87=BA=E6=97=B6=20`&`=20=E5=8F=98=E4=B8=BA?= =?UTF-8?q?=E5=AE=9E=E4=BD=93=20`&`=20Fix=20https://github.com/siyuan-?= =?UTF-8?q?note/siyuan/issues/7659?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/export.go | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/model/export.go b/kernel/model/export.go index c5b2eff4f..0eda744b6 100644 --- a/kernel/model/export.go +++ b/kernel/model/export.go @@ -1655,6 +1655,7 @@ func exportTree(tree *parse.Tree, wysiwyg, expandKaTexMacros, keepFold bool, if "" == linkText { linkText = sql.GetRefText(defID) } + linkText = html.UnescapeHTMLStr(linkText) // 块引锚文本导出时 `&` 变为实体 `&` https://github.com/siyuan-note/siyuan/issues/7659 if Conf.Editor.BlockRefDynamicAnchorTextMaxLen < utf8.RuneCountInString(linkText) { linkText = gulu.Str.SubStr(linkText, Conf.Editor.BlockRefDynamicAnchorTextMaxLen) + "..." }