An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: Improve database text, email, url and phone field content escaping https://github.com/siyuan-note/siyuan/issues/11255
Daniel83209e6ab215
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.goindex a7985513ff..cbdf535ef4 100644--- a/kernel/model/attribute_view.go+++ b/kernel/model/attribute_view.go@@ -1087,10 +1087,22 @@ func renderAttributeViewTable(attrView *av.AttributeView, view *av.View, query sif nil != tableCell.Value && nil != tableCell.Value.Relation {tableCell.Value.Relation.Contents = nil}- case av.KeyTypeText: // 渲染文本列+ case av.KeyTypeText:if nil != tableCell.Value && nil != tableCell.Value.Text {tableCell.Value.Text.Content = util.EscapeHTML(tableCell.Value.Text.Content)}+ case av.KeyTypeEmail:+ if nil != tableCell.Value && nil != tableCell.Value.Email {+ tableCell.Value.Email.Content = util.EscapeHTML(tableCell.Value.Email.Content)+ }+ case av.KeyTypeURL:+ if nil != tableCell.Value && nil != tableCell.Value.URL {+ tableCell.Value.URL.Content = util.EscapeHTML(tableCell.Value.URL.Content)+ }+ case av.KeyTypePhone:+ if nil != tableCell.Value && nil != tableCell.Value.Phone {+ tableCell.Value.Phone.Content = util.EscapeHTML(tableCell.Value.Phone.Content)+ }}treenode.FillAttributeViewTableCellNilValue(tableCell, rowID, col.ID)diff --git a/kernel/treenode/node.go b/kernel/treenode/node.goindex fd9d5f3b7e..72d1a2bb58 100644--- a/kernel/treenode/node.go+++ b/kernel/treenode/node.go@@ -722,10 +722,22 @@ func renderAttributeViewTable(attrView *av.AttributeView, view *av.View) (ret *aif nil != tableCell.Value && nil != tableCell.Value.Relation {tableCell.Value.Relation.Contents = nil}- case av.KeyTypeText: // 渲染文本列+ case av.KeyTypeText:if nil != tableCell.Value && nil != tableCell.Value.Text {tableCell.Value.Text.Content = util.EscapeHTML(tableCell.Value.Text.Content)}+ case av.KeyTypeEmail:+ if nil != tableCell.Value && nil != tableCell.Value.Email {+ tableCell.Value.Email.Content = util.EscapeHTML(tableCell.Value.Email.Content)+ }+ case av.KeyTypeURL:+ if nil != tableCell.Value && nil != tableCell.Value.URL {+ tableCell.Value.URL.Content = util.EscapeHTML(tableCell.Value.URL.Content)+ }+ case av.KeyTypePhone:+ if nil != tableCell.Value && nil != tableCell.Value.Phone {+ tableCell.Value.Phone.Content = util.EscapeHTML(tableCell.Value.Phone.Content)+ }}FillAttributeViewTableCellNilValue(tableCell, rowID, col.ID)