mirror of
https://github.com/go-gitea/gitea
synced 2025-07-15 23:17:19 +00:00
Convert files to utf-8 for indexing (#7814)
* Convert files to utf-8 for indexing * Move utf8 functions to modules/base * Bump repoIndexerLatestVersion to 3 * Add tests for base/encoding.go * Changes to pass gosimple * Move UTF8 funcs into new modules/charset package
This commit is contained in:
@@ -11,11 +11,11 @@ import (
|
||||
|
||||
"code.gitea.io/gitea/models"
|
||||
"code.gitea.io/gitea/modules/base"
|
||||
"code.gitea.io/gitea/modules/charset"
|
||||
"code.gitea.io/gitea/modules/context"
|
||||
"code.gitea.io/gitea/modules/git"
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
"code.gitea.io/gitea/modules/templates"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -251,7 +251,7 @@ func Diff(ctx *context.Context) {
|
||||
note := &git.Note{}
|
||||
err = git.GetNote(ctx.Repo.GitRepo, commitID, note)
|
||||
if err == nil {
|
||||
ctx.Data["Note"] = string(templates.ToUTF8WithFallback(note.Message))
|
||||
ctx.Data["Note"] = string(charset.ToUTF8WithFallback(note.Message))
|
||||
ctx.Data["NoteCommit"] = note.Commit
|
||||
ctx.Data["NoteAuthor"] = models.ValidateCommitWithEmail(note.Commit)
|
||||
}
|
||||
|
Reference in New Issue
Block a user