Commit d5a8f3ea authored by Mrs4s's avatar Mrs4s Committed by GitHub

Merge pull request #69 from Shigma/master

& escape should come first
parents 0b021784 03bfd9dd
...@@ -323,9 +323,9 @@ func (bot *CQBot) ToElement(t string, d map[string]string, group bool) (message. ...@@ -323,9 +323,9 @@ func (bot *CQBot) ToElement(t string, d map[string]string, group bool) (message.
func CQCodeEscapeText(raw string) string { func CQCodeEscapeText(raw string) string {
ret := raw ret := raw
ret = strings.ReplaceAll(ret, "&", "&")
ret = strings.ReplaceAll(ret, "[", "[") ret = strings.ReplaceAll(ret, "[", "[")
ret = strings.ReplaceAll(ret, "]", "]") ret = strings.ReplaceAll(ret, "]", "]")
ret = strings.ReplaceAll(ret, "&", "&")
return ret return ret
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment