diff options
author | LefsFlare <LefsFlarey@users.noreply.github.com> | 2016-12-21 17:05:49 +0800 |
---|---|---|
committer | 无闻 <u@gogs.io> | 2016-12-21 04:05:49 -0500 |
commit | 39fdb0f9c4f1668b47ff43665d525608a87fb0e6 (patch) | |
tree | 75adac2ec9ec25d0b536ce03baf1c9bea79475e7 /modules/template/template.go | |
parent | 85fbd6e9c6e90ea998719d0d40ddfb71affd9a05 (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.go | 2 |
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 { |