summaryrefslogtreecommitdiffstats
path: root/modules/templates/helper.go
diff options
context:
space:
mode:
authorEthan Koenig <ethantkoenig@gmail.com>2017-11-28 01:43:51 -0800
committerLunny Xiao <xiaolunwen@gmail.com>2017-11-28 17:43:51 +0800
commitb7ebaf6d2078cbf4de00d0782be8bc1b1de644bb (patch)
tree5ad8ef6f9738883e89559112e965b9a0bf303476 /modules/templates/helper.go
parent6a58e3f9fcb8b9f30345e2f8a5812bda72c6baf5 (diff)
downloadgitea-b7ebaf6d2078cbf4de00d0782be8bc1b1de644bb.tar.gz
gitea-b7ebaf6d2078cbf4de00d0782be8bc1b1de644bb.zip
Various wiki bug fixes (#2996)
* Update macaron * Various wiki bug fixes
Diffstat (limited to 'modules/templates/helper.go')
-rw-r--r--modules/templates/helper.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/templates/helper.go b/modules/templates/helper.go
index 7fd0ed35a3..2b9e593360 100644
--- a/modules/templates/helper.go
+++ b/modules/templates/helper.go
@@ -11,6 +11,7 @@ import (
"fmt"
"html/template"
"mime"
+ "net/url"
"path/filepath"
"runtime"
"strings"
@@ -105,6 +106,7 @@ func NewFuncMap() []template.FuncMap {
"ShortSha": base.ShortSha,
"MD5": base.EncodeMD5,
"ActionContent2Commits": ActionContent2Commits,
+ "PathEscape": url.PathEscape,
"EscapePound": func(str string) string {
return strings.NewReplacer("%", "%25", "#", "%23", " ", "%20", "?", "%3F").Replace(str)
},