- [!] fix <br/> in Content

This commit is contained in:
Tong Sun 2021-07-24 18:02:43 -04:00
parent f010d60991
commit 180d94d2d8

View File

@ -331,6 +331,10 @@ func (m *Message) init(bot *Bot) {
if regexp.MustCompile(`^&lt;`).MatchString(m.Content) {
m.Content = html.UnescapeString(m.Content)
}
//if m.IsText()
{
m.Content = strings.Replace(m.Content, `<br/>`, "\n", -1)
}
}
// 发送消息的结构体