Fixed a text editor bug.

It should log the unknown user agents properly now...
This commit is contained in:
Azareal 2018-01-10 04:35:34 +00:00
parent 25074b58b2
commit 5f5994726e
3 changed files with 3 additions and 2 deletions

View File

@ -177,6 +177,7 @@ func PreparseMessage(msg string) string {
msg = RunSshook("preparse_preassign", msg)
}
msg = html.EscapeString(msg)
msg = strings.Replace(msg," ","",-1)
var runes = []rune(msg)
msg = ""

View File

@ -371,7 +371,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
default:
common.AgentViewCounter.Bump(0)
if common.Dev.DebugMode {
log.Print("Unknown UA: ", ua)
log.Print("Unknown UA: ", req.UserAgent())
}
}

View File

@ -334,7 +334,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
default:
common.AgentViewCounter.Bump({{.AllAgentMap.unknown}})
if common.Dev.DebugMode {
log.Print("Unknown UA: ", ua)
log.Print("Unknown UA: ", req.UserAgent())
}
}