Compare commits

...

2 commits

Author SHA1 Message Date
Sam Gleske
6ca24cab77
Merge 0035475214 into 2fdafd34ca 2025-05-22 03:27:52 +00:00
Sam Gleske
0035475214 Remove unnecessary file 2025-05-21 23:27:45 -04:00
2 changed files with 2 additions and 11 deletions

View file

@ -2,6 +2,7 @@ package router
import ( import (
"errors" "errors"
"html"
"io" "io"
"io/fs" "io/fs"
"reflect" "reflect"
@ -115,7 +116,7 @@ func New(tmplDir fs.FS, extraData map[string]interface{}, secret [64]byte) *echo
//"htmlescaper": template.htmlEscaper, //"htmlescaper": template.htmlEscaper,
funcs := template.FuncMap{ funcs := template.FuncMap{
"StringsJoin": strings.Join, "StringsJoin": strings.Join,
"attrescaper": util.EscapeHtmlCode, "attrescaper": html.EscapeString,
} }
templates := make(map[string]*template.Template) templates := make(map[string]*template.Template)
templates["login.html"] = template.Must(template.New("login").Funcs(funcs).Parse(tmplLoginString)) templates["login.html"] = template.Must(template.New("login").Funcs(funcs).Parse(tmplLoginString))

View file

@ -1,10 +0,0 @@
package util
import (
"html"
)
func EscapeHtmlCode(s string) string {
encodedString := html.EscapeString(s)
return encodedString
}