From 39fdb0f9c4f1668b47ff43665d525608a87fb0e6 Mon Sep 17 00:00:00 2001 From: LefsFlare Date: Wed, 21 Dec 2016 17:05:49 +0800 Subject: Fixed 404 caused by unexpected question mark (#3668) This fixes 404 caused when creating new files or wiki pages with question marks. --- modules/template/template.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') 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 { -- cgit v1.2.3