mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 01:20:12 +01:00
🎨 Improve database block content escaping https://github.com/siyuan-note/siyuan/issues/14781
This commit is contained in:
parent
74c66129f2
commit
3b3dedefdb
2 changed files with 6 additions and 3 deletions
|
|
@ -2903,7 +2903,9 @@ func replaceAttributeViewBlock(operation *Operation, tx *Transaction) (err error
|
|||
if !operation.IsDetached {
|
||||
bindBlockAv0(tx, operation.AvID, node, tree)
|
||||
value.IsDetached = false
|
||||
value.Block.Icon, value.Block.Content = getNodeAvBlockText(node)
|
||||
icon, content := getNodeAvBlockText(node)
|
||||
content = util.UnescapeHTML(content)
|
||||
value.Block.Icon, value.Block.Content = icon, content
|
||||
value.UpdatedAt = now
|
||||
err = av.SaveAttributeView(attrView)
|
||||
}
|
||||
|
|
@ -2940,7 +2942,9 @@ func replaceAttributeViewBlock(operation *Operation, tx *Transaction) (err error
|
|||
value.Block.ID = operation.NextID
|
||||
value.IsDetached = operation.IsDetached
|
||||
if !operation.IsDetached {
|
||||
value.Block.Icon, value.Block.Content = getNodeAvBlockText(node)
|
||||
icon, content := getNodeAvBlockText(node)
|
||||
content = util.UnescapeHTML(content)
|
||||
value.Block.Icon, value.Block.Content = icon, content
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue