summaryrefslogtreecommitdiffhomepage
path: root/modules/caddyhttp/templates/tplcontext.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/caddyhttp/templates/tplcontext.go')
-rw-r--r--modules/caddyhttp/templates/tplcontext.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/caddyhttp/templates/tplcontext.go b/modules/caddyhttp/templates/tplcontext.go
index 4c7c86e13..2324586be 100644
--- a/modules/caddyhttp/templates/tplcontext.go
+++ b/modules/caddyhttp/templates/tplcontext.go
@@ -21,6 +21,7 @@ import (
"io/fs"
"net"
"net/http"
+ "net/url"
"os"
"path"
"reflect"
@@ -91,6 +92,7 @@ func (c *TemplateContext) NewTemplate(tplName string) *template.Template {
"httpError": c.funcHTTPError,
"humanize": c.funcHumanize,
"maybe": c.funcMaybe,
+ "pathEscape": url.PathEscape,
})
return c.tpl
}