diff options
author | Unknwon <u@gogs.io> | 2016-03-25 17:09:21 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-03-25 17:09:21 -0400 |
commit | 9dda9ef07c03000cb961a80e3c75459c58602009 (patch) | |
tree | 2b88d5474bd5b0e304b0455fabbf3bb4607975e6 | |
parent | 5ec8ef023057c8250ae9fab6a2fa26951eec848b (diff) | |
parent | 9a43fcb61cec9952ff80be7a0d7d27635186b9e5 (diff) | |
download | gitea-9dda9ef07c03000cb961a80e3c75459c58602009.tar.gz gitea-9dda9ef07c03000cb961a80e3c75459c58602009.zip |
Merge pull request #2883 from nikkomiu/develop
Fixes #2842 Parses URL through EscapePound template function
-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 79b3f83565..c5379e188f 100644 --- a/modules/template/template.go +++ b/modules/template/template.go @@ -97,7 +97,7 @@ func NewFuncMap() []template.FuncMap { "ActionContent2Commits": ActionContent2Commits, "ToUtf8": ToUtf8, "EscapePound": func(str string) string { - return strings.Replace(strings.Replace(str, "%", "%25", -1), "#", "%23", -1) + return strings.NewReplacer("%", "%25", "#", "%23", " ", "%20").Replace(str) }, "RenderCommitMessage": RenderCommitMessage, "ThemeColorMetaTag": func() string { |