0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-26 11:04:30 +01:00

Merge pull request #2883 from nikkomiu/develop

Fixes #2842 Parses URL through EscapePound template function
This commit is contained in:
Unknwon 2016-03-25 17:09:21 -04:00
commit 9dda9ef07c

View file

@ -97,7 +97,7 @@ func NewFuncMap() []template.FuncMap {
"ActionContent2Commits": ActionContent2Commits, "ActionContent2Commits": ActionContent2Commits,
"ToUtf8": ToUtf8, "ToUtf8": ToUtf8,
"EscapePound": func(str string) string { "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, "RenderCommitMessage": RenderCommitMessage,
"ThemeColorMetaTag": func() string { "ThemeColorMetaTag": func() string {