chore: fix various problems (#39298)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
wxiaoguang
2026-09-14 22:15:21 +02:00
committed by GitHub
co-authored by Lunny Xiao
parent 85cbf477e5
commit c0ceea2f8f
14 changed files with 124 additions and 122 deletions
+1 -1
View File
@@ -339,7 +339,7 @@ type DiffInlineComputed struct {
// computeDiffInline makes a DiffInline with computed content, e.g.: Unicode escaping, truncation hint, etc
func computeDiffInline(s template.HTML, isTruncated bool, locale translation.Locale) DiffInlineComputed {
sb, w := htmlutil.NewHTMLStringWriter()
status := charset.EscapeControlHTMLTo(s, locale, w)
status, _ := charset.EscapeControlReader(strings.NewReader(string(s)), w, locale)
if isTruncated {
w.WriteFormatf(`<span class="ui label diff-line-truncated">%s</span>`, locale.Tr("repo.diff.line_truncated"))
}