🐛 块引锚文本导出时 & 变为实体 & Fix https://github.com/siyuan-note/siyuan/issues/7659

This commit is contained in:
Liang Ding 2023-03-14 15:08:12 +08:00
parent 85ff1e53b1
commit 0cde449b45
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -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) + "..."
}