Remove unnecessary file

This commit is contained in:
Sam Gleske 2025-05-21 23:27:45 -04:00
parent 2084a81297
commit 0035475214
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
}