diff options
Diffstat (limited to 'template.go')
-rw-r--r-- | template.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/template.go b/template.go index 5d0d28b..2581da0 100644 --- a/template.go +++ b/template.go @@ -3,6 +3,7 @@ package koushin import ( "html/template" "io" + "net/url" "github.com/labstack/echo/v4" ) @@ -20,6 +21,9 @@ func loadTemplates() (*tmpl, error) { "tuple": func(values ...interface{}) []interface{} { return values }, + "pathescape": func(s string) string { + return url.PathEscape(s) + }, }).ParseGlob("public/*.html") return &tmpl{t}, err } |