]> source.dussan.org Git - gitea.git/commitdiff
Fix project description rendering for org (#30587)
authorwxiaoguang <wxiaoguang@gmail.com>
Fri, 19 Apr 2024 07:58:56 +0000 (15:58 +0800)
committerGitHub <noreply@github.com>
Fri, 19 Apr 2024 07:58:56 +0000 (07:58 +0000)
Fix #30263

![image](https://github.com/go-gitea/gitea/assets/2114189/41cabe6c-f94a-4874-a26f-d01bb89bb28c)

Co-authored-by: Giteabot <teabot@gitea.io>
routers/web/org/projects.go

index d439b11cf926f11bb418a7b74f8ce567633be39a..7f78d1c830b7f36e16ab865b8cbc2a850d8d4e7f 100644 (file)
@@ -104,7 +104,7 @@ func Projects(ctx *context.Context) {
        }
 
        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)
@@ -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["PageIsViewProjects"] = true
        ctx.Data["CanWriteProjects"] = canWriteProjects(ctx)