diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2021-06-23 23:09:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-23 17:09:51 -0400 |
commit | c9c7afda1a80bda7b61ded222163db796132b78f (patch) | |
tree | 2145a5afe7c7a19d450b7def199dc302e1c8d6f2 /modules/markup/orgmode | |
parent | eb324a9402878a13029116bafa8ccce527796522 (diff) | |
download | gitea-c9c7afda1a80bda7b61ded222163db796132b78f.tar.gz gitea-c9c7afda1a80bda7b61ded222163db796132b78f.zip |
Add sanitizer rules per renderer (#16110)
* Added sanitizer rules per renderer.
* Updated documentation.
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'modules/markup/orgmode')
-rw-r--r-- | modules/markup/orgmode/orgmode.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/markup/orgmode/orgmode.go b/modules/markup/orgmode/orgmode.go index 851fc97f9a..7e9f1f45c5 100644 --- a/modules/markup/orgmode/orgmode.go +++ b/modules/markup/orgmode/orgmode.go @@ -13,6 +13,7 @@ import ( "code.gitea.io/gitea/modules/highlight" "code.gitea.io/gitea/modules/markup" + "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" "github.com/alecthomas/chroma" @@ -41,6 +42,11 @@ func (Renderer) Extensions() []string { return []string{".org"} } +// SanitizerRules implements markup.Renderer +func (Renderer) SanitizerRules() []setting.MarkupSanitizerRule { + return []setting.MarkupSanitizerRule{} +} + // Render renders orgmode rawbytes to HTML func Render(ctx *markup.RenderContext, input io.Reader, output io.Writer) error { htmlWriter := org.NewHTMLWriter() |