commit
5259114400
@ -5,8 +5,10 @@ import (
|
|||||||
"encoding/xml"
|
"encoding/xml"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"html"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
@ -326,6 +328,13 @@ func (m *Message) init(bot *Bot) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if regexp.MustCompile(`^<`).MatchString(m.Content) {
|
||||||
|
m.Content = html.UnescapeString(m.Content)
|
||||||
|
}
|
||||||
|
//if m.IsText()
|
||||||
|
{
|
||||||
|
m.Content = strings.Replace(m.Content, `<br/>`, "\n", -1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 发送消息的结构体
|
// 发送消息的结构体
|
||||||
|
Loading…
x
Reference in New Issue
Block a user