From 171aba527eccbe6baa2ef9bf6401fe9077d19d7e Mon Sep 17 00:00:00 2001 From: Mrs4s <1844812067@qq.com> Date: Thu, 12 Nov 2020 21:50:57 +0800 Subject: [PATCH] fix xml escape. --- coolq/cqcode.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coolq/cqcode.go b/coolq/cqcode.go index f092a5f..2923948 100644 --- a/coolq/cqcode.go +++ b/coolq/cqcode.go @@ -554,7 +554,7 @@ func (bot *CQBot) ToElement(t string, d map[string]string, group bool) (m messag }}, nil } xml := fmt.Sprintf(``, - d["title"], d["url"], d["image"], d["audio"], d["title"], d["content"]) + url.PathEscape(d["title"]), d["url"], d["image"], d["audio"], url.PathEscape(d["title"]), url.PathEscape(d["content"])) return &message.ServiceElement{ Id: 60, Content: xml,