Commit 03bfd9dd authored by Shigma's avatar Shigma

& escape should come first

parent 0b021784
...@@ -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