aboutsummaryrefslogtreecommitdiff
path: root/modules/template/template.go
diff options
context:
space:
mode:
authorLefsFlare <LefsFlarey@users.noreply.github.com>2016-12-21 17:05:49 +0800
committer无闻 <u@gogs.io>2016-12-21 04:05:49 -0500
commit39fdb0f9c4f1668b47ff43665d525608a87fb0e6 (patch)
tree75adac2ec9ec25d0b536ce03baf1c9bea79475e7 /modules/template/template.go
parent85fbd6e9c6e90ea998719d0d40ddfb71affd9a05 (diff)
Fixed 404 caused by unexpected question mark (#3668)
This fixes 404 caused when creating new files or wiki pages with question marks.
Diffstat (limited to 'modules/template/template.go')
-rw-r--r--modules/template/template.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/template/template.go b/modules/template/template.go
index 3a6eb042..f005d5ce 100644
--- a/modules/template/template.go
+++ b/modules/template/template.go
@@ -97,7 +97,7 @@ func NewFuncMap() []template.FuncMap {
"MD5": base.EncodeMD5,
"ActionContent2Commits": ActionContent2Commits,
"EscapePound": func(str string) string {
- return strings.NewReplacer("%", "%25", "#", "%23", " ", "%20").Replace(str)
+ return strings.NewReplacer("%", "%25", "#", "%23", " ", "%20", "?", "%3F").Replace(str)
},
"RenderCommitMessage": RenderCommitMessage,
"ThemeColorMetaTag": func() string {