]> source.dussan.org Git - gitea.git/commit
Refactor markup render system (#32533)
authorwxiaoguang <wxiaoguang@gmail.com>
Mon, 18 Nov 2024 05:25:42 +0000 (13:25 +0800)
committerGitHub <noreply@github.com>
Mon, 18 Nov 2024 05:25:42 +0000 (13:25 +0800)
commit8a20fba8eb1ac01a0de9355eff84af69d4636d96
treebf37fa52f688a31b6cf8d4879438020b108235cc
parent4f879a00df029e09b40f64bf8de0572704766115
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
42 files changed:
modules/html/html.go [deleted file]
modules/htmlutil/html.go [new file with mode: 0644]
modules/htmlutil/html_test.go [new file with mode: 0644]
modules/markup/asciicast/asciicast.go
modules/markup/common/html.go [deleted file]
modules/markup/common/linkify.go
modules/markup/console/console.go
modules/markup/csv/csv.go
modules/markup/external/external.go
modules/markup/html.go
modules/markup/html_codepreview.go
modules/markup/html_email.go
modules/markup/html_emoji.go
modules/markup/html_issue.go
modules/markup/html_link.go
modules/markup/html_mention.go
modules/markup/internal/finalprocessor.go [new file with mode: 0644]
modules/markup/internal/internal_test.go [new file with mode: 0644]
modules/markup/internal/renderinternal.go [new file with mode: 0644]
modules/markup/markdown/ast.go
modules/markup/markdown/goldmark.go
modules/markup/markdown/markdown.go
modules/markup/markdown/markdown_test.go
modules/markup/markdown/math/block_renderer.go
modules/markup/markdown/math/inline_renderer.go
modules/markup/markdown/math/math.go
modules/markup/markdown/meta_test.go
modules/markup/markdown/transform_blockquote.go
modules/markup/markdown/transform_codespan.go
modules/markup/markdown/transform_list.go
modules/markup/render.go
modules/markup/sanitizer_custom.go
modules/markup/sanitizer_default.go
modules/markup/sanitizer_default_test.go
modules/setting/markup.go
modules/svg/svg.go
modules/templates/helper.go
modules/templates/helper_test.go
modules/templates/util_avatar.go
modules/templates/util_render.go
modules/templates/util_render_test.go
routers/web/repo/wiki.go