From 00b883880d320a9340b35cd3fa9ff6e60010ac76 Mon Sep 17 00:00:00 2001 From: mrsdizzie Date: Sun, 5 May 2019 15:39:10 -0400 Subject: [PATCH] Don't post process commit summary in templates (#6842) * Don't post process commit summary in templates Don't run summary through render/post process to avoid it generating links and breaking certain views where the summary is already expected to be a link to the commit. For consistancy, disable processing of summary in all locations. Fixes #6809 * Do process title on diff page On second thought, the title is often the only place a pull request number will exists so do process it on the individual diff page. This fixes the list view and still gives easy access to the PR link --- templates/repo/commits_table.tmpl | 2 +- templates/repo/view_list.tmpl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/repo/commits_table.tmpl b/templates/repo/commits_table.tmpl index 8c8cdf2094..66bfd0d831 100644 --- a/templates/repo/commits_table.tmpl +++ b/templates/repo/commits_table.tmpl @@ -68,7 +68,7 @@ - {{RenderCommitMessage .Summary $.RepoLink $.Repository.ComposeMetas}} + {{.Summary}} {{if IsMultilineCommitMessage .Message}} diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl index 089221480c..f4ef4e2e40 100644 --- a/templates/repo/view_list.tmpl +++ b/templates/repo/view_list.tmpl @@ -27,7 +27,7 @@ {{end}} - {{RenderCommitMessage .LatestCommit.Summary .RepoLink $.Repository.ComposeMetas}} + {{.LatestCommit.Summary}} {{if IsMultilineCommitMessage .LatestCommit.Message}} @@ -79,7 +79,7 @@ {{end}} - {{RenderCommitMessageLink $commit.Summary $.RepoLink (print $.RepoLink "/commit/" $commit.ID) $.Repository.ComposeMetas}} + {{$commit.Summary}} {{TimeSince $commit.Committer.When $.Lang}}