diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-04-19 09:58:56 +0200 |
---|---|---|
committer | Gergely Nagy <forgejo@gergo.csillger.hu> | 2024-04-21 16:28:16 +0200 |
commit | abeea4275163c3d44ae670a965d59e3d3e88e619 (patch) | |
tree | b07ed56195e645ad19f8b153f062d7a5e579e706 /routers | |
parent | Avoid importing `modules/web/middleware` in `modules/session` (#30584) (diff) | |
download | forgejo-abeea4275163c3d44ae670a965d59e3d3e88e619.tar.xz forgejo-abeea4275163c3d44ae670a965d59e3d3e88e619.zip |
Fix project description rendering for org (#30587)
Fix #30263
![image](https://github.com/go-gitea/gitea/assets/2114189/41cabe6c-f94a-4874-a26f-d01bb89bb28c)
Co-authored-by: Giteabot <teabot@gitea.io>
(cherry picked from commit eb24d973b036e4dddf505d8c12e905ecb1a688f9)
Diffstat (limited to 'routers')
-rw-r--r-- | routers/web/org/projects.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/web/org/projects.go b/routers/web/org/projects.go index 38f9b85ace..821228b347 100644 --- a/routers/web/org/projects.go +++ b/routers/web/org/projects.go @@ -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) |