Skip to content

Commit

Permalink
🐛 Fix cqcode escape
Browse files Browse the repository at this point in the history
  • Loading branch information
kanrichan authored Dec 19, 2020
1 parent a420b79 commit e0e1c11
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions onebot/xqcqcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ func whatCQprams(code string) map[string]interface{} {
equal := strings.Index(code[start:], "=") + start
if !strings.Contains(code[equal:], ",") {
// 如果没有 , 参数 遍历完毕
elems[code[index+1:equal]] = code[equal+1 : (len(code) - 1)]
elems[code[index+1:equal]] = escape(code[equal+1 : (len(code) - 1)])
break
}
end := strings.Index(code[equal:], ",") + equal
elems[code[index+1:equal]] = code[equal+1 : end]
elems[code[index+1:equal]] = escape(code[equal+1 : end])
start = end
}
return map[string]interface{}{"data": escape(elems)}
return map[string]interface{}{"data": elems}
}

// xq2cqCode 普通XQ码转CQ码
Expand Down

0 comments on commit e0e1c11

Please sign in to comment.