diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-03-03 22:43:30 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-03 22:43:30 +0800 |
commit | 807e8e280c02b4e9082899c7e364731b44d09143 (patch) | |
tree | dae24cf8f54b8fa133111dd256256c021f8728e4 /templates/mail/issue/default.tmpl | |
parent | 2f49b55c193faf7a1ab59d91fc707f2010143483 (diff) | |
download | gitea-807e8e280c02b4e9082899c7e364731b44d09143.tar.gz gitea-807e8e280c02b4e9082899c7e364731b44d09143.zip |
Revert relative links to absolute links in mail templates (#23267)
Follow #21986 , fix regression.
The mail templates should always use `AppURL` (the full absolute URL)
Diffstat (limited to 'templates/mail/issue/default.tmpl')
-rw-r--r-- | templates/mail/issue/default.tmpl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/templates/mail/issue/default.tmpl b/templates/mail/issue/default.tmpl index 3bda408a05..64dbb3df68 100644 --- a/templates/mail/issue/default.tmpl +++ b/templates/mail/issue/default.tmpl @@ -20,11 +20,11 @@ {{if eq .ActionName "push"}} <p> {{if .Comment.IsForcePush}} - {{$oldCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.Link .Comment.OldCommit}} + {{$oldCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.OldCommit}} {{$oldShortSha := ShortSha .Comment.OldCommit}} {{$oldCommitLink := printf "<a href='%[1]s'><b>%[2]s</b></a>" (Escape $oldCommitUrl) (Escape $oldShortSha)}} - {{$newCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.Link .Comment.NewCommit}} + {{$newCommitUrl := printf "%s/commit/%s" .Comment.Issue.PullRequest.BaseRepo.HTMLURL .Comment.NewCommit}} {{$newShortSha := ShortSha .Comment.NewCommit}} {{$newCommitLink := printf "<a href='%[1]s'><b>%[2]s</b></a>" (Escape $newCommitUrl) (Escape $newShortSha)}} @@ -72,7 +72,7 @@ <ul> {{range .Comment.Commits}} <li> - <a href="{{$.Comment.Issue.PullRequest.BaseRepo.Link}}/commit/{{.ID}}"> + <a href="{{$.Comment.Issue.PullRequest.BaseRepo.HTMLURL}}/commit/{{.ID}}"> {{ShortSha .ID.String}} </a> - {{.Summary}} </li> |