1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-07-05 13:53:25 +00: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

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
}