Fix 4727: CSS when the request URI is invalid

This commit is contained in:
Ming Deng
2021-08-17 00:31:41 +08:00
parent 17e857a762
commit e37e84b3d7
3 changed files with 5 additions and 6 deletions

View File

@@ -82,13 +82,10 @@ type adminApp struct {
*HttpServer
}
// Route adds http.HandlerFunc to adminApp with url pattern.
// Run start Beego admin
func (admin *adminApp) Run() {
// if len(task.AdminTaskList) > 0 {
// task.StartTask()
// }
logs.Warning("now we don't start tasks here, if you use task module," +
logs.Debug("now we don't start tasks here, if you use task module," +
" please invoke task.StartTask, or task will not be executed")
addr := BConfig.Listen.AdminAddr

View File

@@ -16,6 +16,7 @@ package web
import (
"fmt"
"html/template"
"sync"
"time"
@@ -98,7 +99,7 @@ func (m *URLMap) GetMap() map[string]interface{} {
for k, v := range m.urlmap {
for kk, vv := range v {
result := []string{
fmt.Sprintf("% -50s", k),
fmt.Sprintf("% -50s", template.HTMLEscapeString(k)),
fmt.Sprintf("% -10s", kk),
fmt.Sprintf("% -16d", vv.RequestNum),
fmt.Sprintf("%d", vv.TotalTime),