mirror of
https://github.com/go-gitea/gitea
synced 2025-07-04 17:47:19 +00:00
modules/base: add RenderCommitMessage with XSS-safe and special links
- update russian locale
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user