escape html in filter log message
This commit is contained in:
parent
2010b04cf3
commit
cbeadbd18e
1 changed files with 3 additions and 2 deletions
|
@ -2,6 +2,7 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"html"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -28,11 +29,11 @@ type Filter struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (filter *Filter) logf(format string, v ...any) {
|
func (filter *Filter) logf(format string, v ...any) {
|
||||||
filter.Logs = append(filter.Logs, fmt.Sprintf(format, v...))
|
filter.Logs = append(filter.Logs, html.EscapeString(fmt.Sprintf(format, v...)))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (filter *Filter) log(v ...any) {
|
func (filter *Filter) log(v ...any) {
|
||||||
filter.Logs = append(filter.Logs, fmt.Sprint(v...))
|
filter.Logs = append(filter.Logs, html.EscapeString(fmt.Sprint(v...)))
|
||||||
}
|
}
|
||||||
|
|
||||||
type FilterConnection struct {
|
type FilterConnection struct {
|
||||||
|
|
Loading…
Add table
Reference in a new issue