mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	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>
This commit is contained in:
		@@ -5,9 +5,7 @@
 | 
			
		||||
	{{if .OriginalAuthor}}
 | 
			
		||||
		<span class="avatar"><img src="{{AppSubUrl}}/assets/img/avatar_default.png"></span>
 | 
			
		||||
	{{else}}
 | 
			
		||||
		<a class="avatar" {{if gt .Poster.ID 0}}href="{{.Poster.HomeLink}}"{{end}}>
 | 
			
		||||
			{{avatar .Poster}}
 | 
			
		||||
		</a>
 | 
			
		||||
		{{template "shared/user/avatarlink" .Poster}}
 | 
			
		||||
	{{end}}
 | 
			
		||||
	<div class="content comment-container">
 | 
			
		||||
		<div class="ui top attached header comment-header df ac sb">
 | 
			
		||||
@@ -27,9 +25,7 @@
 | 
			
		||||
					</span>
 | 
			
		||||
				{{else}}
 | 
			
		||||
					<span class="text grey">
 | 
			
		||||
						<a {{if gt .Poster.ID 0}}href="{{.Poster.HomeLink}}"{{end}}>
 | 
			
		||||
							{{.Poster.GetDisplayName}}
 | 
			
		||||
						</a>
 | 
			
		||||
						{{template "shared/user/namelink" .Poster}}
 | 
			
		||||
						{{$.root.locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr | Safe}}
 | 
			
		||||
					</span>
 | 
			
		||||
				{{end}}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user