Use RenderedContent

This commit is contained in:
stuzer05 2024-07-08 09:51:30 +03:00
parent 4ff958be73
commit 3499c4414b
No known key found for this signature in database
GPG Key ID: A6ABAAA9268F9F4F
2 changed files with 4 additions and 2 deletions

View File

@ -1777,7 +1777,9 @@ func ViewIssue(ctx *context.Context) {
}
} else if comment.Type == issues_model.CommentTypeChangeTimeEstimate {
timeSec, _ := util.ToInt64(comment.Content)
comment.Content = util.SecToTimeExact(timeSec, timeSec < 60)
timeStr := util.SecToTimeExact(timeSec, timeSec < 60)
comment.RenderedContent = templates.SanitizeHTML(timeStr)
}
if comment.Type == issues_model.CommentTypeClose || comment.Type == issues_model.CommentTypeMergePull {

View File

@ -685,7 +685,7 @@
{{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{ctx.Locale.Tr "repo.issues.change_time_estimate_at" .Content $createdStr | SafeHTML}}
{{ctx.Locale.Tr "repo.issues.change_time_estimate_at" .RenderedContent $createdStr | SafeHTML}}
</span>
</div>
{{end}}