aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2024-11-18 13:25:42 +0800
committerGitHub <noreply@github.com>2024-11-18 13:25:42 +0800
commit8a20fba8eb1ac01a0de9355eff84af69d4636d96 (patch)
treebf37fa52f688a31b6cf8d4879438020b108235cc /routers
parent4f879a00df029e09b40f64bf8de0572704766115 (diff)
downloadgitea-8a20fba8eb1ac01a0de9355eff84af69d4636d96.tar.gz
gitea-8a20fba8eb1ac01a0de9355eff84af69d4636d96.zip
Refactor markup render system (#32533)
Remove unmaintainable sanitizer rules. No need to add special "class" regexp rules anymore, use RenderInternal.SafeAttr instead, more details (and examples) are in the tests
Diffstat (limited to 'routers')
-rw-r--r--routers/web/repo/wiki.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/repo/wiki.go b/routers/web/repo/wiki.go
index 13f6b69493..2732a67e71 100644
--- a/routers/web/repo/wiki.go
+++ b/routers/web/repo/wiki.go
@@ -326,7 +326,7 @@ func renderViewPage(ctx *context.Context) (*git.Repository, *git.TreeEntry) {
if rctx.SidebarTocNode != nil {
sb := &strings.Builder{}
- err = markdown.SpecializedMarkdown().Renderer().Render(sb, nil, rctx.SidebarTocNode)
+ err = markdown.SpecializedMarkdown(rctx).Renderer().Render(sb, nil, rctx.SidebarTocNode)
if err != nil {
log.Error("Failed to render wiki sidebar TOC: %v", err)
} else {