diff options
author | zeripath <art27@cantab.net> | 2022-09-03 10:33:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-03 10:33:34 +0100 |
commit | de7b87fbc238e0685c01cb26a580b3d21cee623a (patch) | |
tree | b2bc27a5e219853c8e53ed0a6f2abf23b02aede4 /templates/shared/user | |
parent | 18046eb91e21e03d475f3990e59516b46b6f67e2 (diff) | |
download | gitea-de7b87fbc238e0685c01cb26a580b3d21cee623a.tar.gz gitea-de7b87fbc238e0685c01cb26a580b3d21cee623a.zip |
Do not add links to Posters or Assignees with ID < 0 (#20577)
There are several places in templates/repo/issue/view_content/comments.tmpl where links are made to Posters or Assignees who are Ghosts or have IDs <0.
Fix #20559
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'templates/shared/user')
-rw-r--r-- | templates/shared/user/authorlink.tmpl | 3 | ||||
-rw-r--r-- | templates/shared/user/avatarlink.tmpl | 3 | ||||
-rw-r--r-- | templates/shared/user/namelink.tmpl | 3 |
3 files changed, 9 insertions, 0 deletions
diff --git a/templates/shared/user/authorlink.tmpl b/templates/shared/user/authorlink.tmpl new file mode 100644 index 0000000000..81c2a4ed5e --- /dev/null +++ b/templates/shared/user/authorlink.tmpl @@ -0,0 +1,3 @@ +<a class="author"{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}> + {{.GetDisplayName}} +</a> diff --git a/templates/shared/user/avatarlink.tmpl b/templates/shared/user/avatarlink.tmpl new file mode 100644 index 0000000000..40f5ee7129 --- /dev/null +++ b/templates/shared/user/avatarlink.tmpl @@ -0,0 +1,3 @@ +<a class="avatar"{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}> + {{avatar .}} +</a> diff --git a/templates/shared/user/namelink.tmpl b/templates/shared/user/namelink.tmpl new file mode 100644 index 0000000000..25dff36a78 --- /dev/null +++ b/templates/shared/user/namelink.tmpl @@ -0,0 +1,3 @@ +<a{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}> + {{.GetDisplayName}} +</a> |