2
0
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:
耗子
2023-08-13 15:50:22 +08:00
parent 5d1fbb2e2b
commit 4dd99a149c
8 changed files with 19 additions and 13 deletions

View File

@@ -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)
}