mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-16 15:26:01 +00:00
chore: fix various problems (#39298)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
@@ -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"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user