Skip to content

Commit 3499c44

Browse files
committed
Use RenderedContent
1 parent 4ff958b commit 3499c44

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

routers/web/repo/issue.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1777,7 +1777,9 @@ func ViewIssue(ctx *context.Context) {
17771777
}
17781778
} else if comment.Type == issues_model.CommentTypeChangeTimeEstimate {
17791779
timeSec, _ := util.ToInt64(comment.Content)
1780-
comment.Content = util.SecToTimeExact(timeSec, timeSec < 60)
1780+
timeStr := util.SecToTimeExact(timeSec, timeSec < 60)
1781+
1782+
comment.RenderedContent = templates.SanitizeHTML(timeStr)
17811783
}
17821784

17831785
if comment.Type == issues_model.CommentTypeClose || comment.Type == issues_model.CommentTypeMergePull {

templates/repo/issue/view_content/comments.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@
685685
{{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
686686
<span class="text grey muted-links">
687687
{{template "shared/user/authorlink" .Poster}}
688-
{{ctx.Locale.Tr "repo.issues.change_time_estimate_at" .Content $createdStr | SafeHTML}}
688+
{{ctx.Locale.Tr "repo.issues.change_time_estimate_at" .RenderedContent $createdStr | SafeHTML}}
689689
</span>
690690
</div>
691691
{{end}}

0 commit comments

Comments
 (0)