🐛 存在命名的块复制为引用时未转义命名文本 Fix https://github.com/siyuan-note/siyuan/issues/7254

This commit is contained in:
Liang Ding 2023-02-04 10:48:20 +08:00
parent 8c6b10a02b
commit ea45e7ccb3
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -94,8 +94,10 @@ func GetBlockRefText(id string) string {
}
func getNodeRefText(node *ast.Node) string {
if name := node.IALAttr("name"); "" != name {
return name
if ret := node.IALAttr("name"); "" != ret {
ret = strings.TrimSpace(ret)
ret = util.EscapeHTML(ret)
return ret
}
switch node.Type {