diff options
author | Unknwon <u@gogs.io> | 2015-12-04 21:30:33 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-12-04 21:30:33 -0500 |
commit | e538ff27704cddb1a99efc1a6be19e134f97355f (patch) | |
tree | 88f93b17d47aeb3ac4dd0692f5c5b613ee38b28b /modules/template | |
parent | 76d4b9288b60ed6c037257415a570225764ff0a0 (diff) | |
download | gitea-e538ff27704cddb1a99efc1a6be19e134f97355f.tar.gz gitea-e538ff27704cddb1a99efc1a6be19e134f97355f.zip |
fix #1829 and fix #890
Diffstat (limited to 'modules/template')
-rw-r--r-- | modules/template/template.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/template/template.go b/modules/template/template.go index c408ac8a26..d0d77b017b 100644 --- a/modules/template/template.go +++ b/modules/template/template.go @@ -183,9 +183,9 @@ func ReplaceLeft(s, old, new string) string { } // RenderCommitMessage renders commit message with XSS-safe and special links. -func RenderCommitMessage(msg, urlPrefix string) template.HTML { +func RenderCommitMessage(msg, urlPrefix string, metas map[string]string) template.HTML { cleanMsg := template.HTMLEscapeString(msg) - fullMessage := string(base.RenderIssueIndexPattern([]byte(cleanMsg), urlPrefix)) + fullMessage := string(base.RenderIssueIndexPattern([]byte(cleanMsg), urlPrefix, metas)) msgLines := strings.Split(strings.TrimSpace(fullMessage), "\n") for i := range msgLines { msgLines[i] = ReplaceLeft(msgLines[i], " ", " ") |