- [#] Unescape XML in Content
This commit is contained in:
parent
d5fc8bbbd9
commit
f010d60991
@ -5,8 +5,10 @@ import (
|
||||
"encoding/xml"
|
||||
"errors"
|
||||
"fmt"
|
||||
"html"
|
||||
"net/http"
|
||||
"os"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
@ -326,6 +328,9 @@ func (m *Message) init(bot *Bot) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if regexp.MustCompile(`^<`).MatchString(m.Content) {
|
||||
m.Content = html.UnescapeString(m.Content)
|
||||
}
|
||||
}
|
||||
|
||||
// 发送消息的结构体
|
||||
|
Loading…
x
Reference in New Issue
Block a user