mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 13:47:15 +08:00
feat: escape log output
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"strings"
|
||||
"text/template"
|
||||
"unicode/utf8"
|
||||
)
|
||||
|
||||
@@ -78,3 +79,8 @@ func Cut(str, begin, end string) string {
|
||||
|
||||
return string([]rune(str)[b:e])
|
||||
}
|
||||
|
||||
// Escape 转义字符串
|
||||
func Escape(str string) string {
|
||||
return template.HTMLEscapeString(str)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user