🐛 Fix template rendering for dynamic icon path https://github.com/siyuan-note/siyuan/issues/13211
This commit is contained in:
parent
2ce5ba72ee
commit
dfa246021f
1 changed files with 7 additions and 0 deletions
|
@ -407,6 +407,13 @@ func RenderTemplate(p, id string, preview bool) (tree *parse.Tree, dom string, e
|
|||
return ast.WalkContinue
|
||||
})
|
||||
|
||||
icon := tree.Root.IALAttr("icon")
|
||||
if "" != icon {
|
||||
// 动态图标需要反转义 https://github.com/siyuan-note/siyuan/issues/13211
|
||||
icon = util.UnescapeHTML(icon)
|
||||
tree.Root.SetIALAttr("icon", icon)
|
||||
}
|
||||
|
||||
luteEngine := NewLute()
|
||||
dom = luteEngine.Tree2BlockDOM(tree, luteEngine.RenderOptions)
|
||||
return
|
||||
|
|
Loading…
Add table
Reference in a new issue