mirror of
https://github.com/silenceper/wechat.git
synced 2026-02-06 21:52:27 +08:00
序列化 xml 时添加 cdata 标签
This commit is contained in:
@@ -3,12 +3,12 @@ package message
|
||||
//Text 文本消息
|
||||
type Text struct {
|
||||
CommonToken
|
||||
Content string `xml:"Content"`
|
||||
Content CDATA `xml:"Content"`
|
||||
}
|
||||
|
||||
//NewText 初始化文本消息
|
||||
func NewText(content string) *Text {
|
||||
text := new(Text)
|
||||
text.Content = content
|
||||
text.Content = CDATA(content)
|
||||
return text
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user