1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-15 06:57:20 +00:00

Merge branch 'main' into fix-pypi-simple

This commit is contained in:
Giteabot
2024-04-20 08:12:22 +08:00
committed by GitHub
5 changed files with 5369 additions and 5220 deletions

5223
CHANGELOG-archived.md Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -468,7 +468,7 @@ func parseCommitFileStatus(fileStatus *CommitFileStatus, stdout io.Reader) {
_, _ = rd.Discard(1) _, _ = rd.Discard(1)
} }
for { for {
modifier, err := rd.ReadSlice('\x00') modifier, err := rd.ReadString('\x00')
if err != nil { if err != nil {
if err != io.EOF { if err != io.EOF {
log.Error("Unexpected error whilst reading from git log --name-status. Error: %v", err) log.Error("Unexpected error whilst reading from git log --name-status. Error: %v", err)

View File

@ -104,7 +104,7 @@ func Projects(ctx *context.Context) {
} }
for _, project := range projects { for _, project := range projects {
project.RenderedContent = templates.SanitizeHTML(project.Description) // FIXME: is it right? why not render? project.RenderedContent = templates.RenderMarkdownToHtml(ctx, project.Description)
} }
err = shared_user.LoadHeaderCount(ctx) err = shared_user.LoadHeaderCount(ctx)
@ -372,7 +372,7 @@ func ViewProject(ctx *context.Context) {
} }
} }
project.RenderedContent = templates.SanitizeHTML(project.Description) // FIXME: is it right? why not render? project.RenderedContent = templates.RenderMarkdownToHtml(ctx, project.Description)
ctx.Data["LinkedPRs"] = linkedPrsMap ctx.Data["LinkedPRs"] = linkedPrsMap
ctx.Data["PageIsViewProjects"] = true ctx.Data["PageIsViewProjects"] = true
ctx.Data["CanWriteProjects"] = canWriteProjects(ctx) ctx.Data["CanWriteProjects"] = canWriteProjects(ctx)

View File

@ -258,7 +258,7 @@ func Routes() *web.Route {
routes.Get("/metrics", append(mid, Metrics)...) routes.Get("/metrics", append(mid, Metrics)...)
} }
routes.Get("/robots.txt", append(mid, misc.RobotsTxt)...) routes.Methods("GET,HEAD", "/robots.txt", append(mid, misc.RobotsTxt)...)
routes.Get("/ssh_info", misc.SSHInfo) routes.Get("/ssh_info", misc.SSHInfo)
routes.Get("/api/healthz", healthcheck.Check) routes.Get("/api/healthz", healthcheck.Check)