mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-07-03 14:09:06 +02:00
🐛 存在命名的块复制为引用时未转义命名文本 Fix https://github.com/siyuan-note/siyuan/issues/7254
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user