1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-05 11:33:48 +08:00

Merge pull request #69 from Shigma/master

& escape should come first
This commit is contained in:
Mrs4s 2020-08-10 12:51:26 +08:00 committed by GitHub
commit d5a8f3ead2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -323,9 +323,9 @@ func (bot *CQBot) ToElement(t string, d map[string]string, group bool) (message.
func CQCodeEscapeText(raw string) string {
ret := raw
ret = strings.ReplaceAll(ret, "&", "&")
ret = strings.ReplaceAll(ret, "[", "[")
ret = strings.ReplaceAll(ret, "]", "]")
ret = strings.ReplaceAll(ret, "&", "&")
return ret
}