diff options
author | Unknwon <joe2010xtmf@163.com> | 2015-01-30 18:05:20 -0500 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2015-01-30 18:05:20 -0500 |
commit | 37fcc8daf2d7d86e4d0f8baaeab0b2e11e5ec8d0 (patch) | |
tree | 701088978b660c46cdb463e0f191aed8adb01195 /routers/repo/commit.go | |
parent | 9803f84c883c372cca9ed5859cbf8f930af63d51 (diff) | |
download | gitea-37fcc8daf2d7d86e4d0f8baaeab0b2e11e5ec8d0.tar.gz gitea-37fcc8daf2d7d86e4d0f8baaeab0b2e11e5ec8d0.zip |
modules/base: add RenderCommitMessage with XSS-safe and special links
- update russian locale
Diffstat (limited to 'routers/repo/commit.go')
-rw-r--r-- | routers/repo/commit.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/repo/commit.go b/routers/repo/commit.go index 4571b24f2a..e92ec8c88c 100644 --- a/routers/repo/commit.go +++ b/routers/repo/commit.go @@ -37,7 +37,7 @@ func RenderIssueLinks(oldCommits *list.List, repoLink string) *list.List { newCommits := list.New() for e := oldCommits.Front(); e != nil; e = e.Next() { c := e.Value.(*git.Commit) - c.CommitMessage = string(base.RenderIssueIndexPattern([]byte(c.CommitMessage), repoLink)) + c.CommitMessage = c.CommitMessage newCommits.PushBack(c) } return newCommits @@ -206,7 +206,7 @@ func Diff(ctx *middleware.Context) { commitId := ctx.Repo.CommitId commit := ctx.Repo.Commit - commit.CommitMessage = string(base.RenderIssueIndexPattern([]byte(commit.CommitMessage), ctx.Repo.RepoLink)) + commit.CommitMessage = commit.CommitMessage diff, err := models.GetDiffCommit(models.RepoPath(userName, repoName), commitId, setting.Git.MaxGitDiffLines) if err != nil { |