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/external | |
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/external')
-rw-r--r-- | modules/markup/external/external.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/markup/external/external.go b/modules/markup/external/external.go index 62814c9914..c849f505e7 100644 --- a/modules/markup/external/external.go +++ b/modules/markup/external/external.go @@ -30,7 +30,7 @@ func RegisterRenderers() { // Renderer implements markup.Renderer for external tools type Renderer struct { - setting.MarkupRenderer + *setting.MarkupRenderer } // Name returns the external tool name @@ -48,6 +48,11 @@ func (p *Renderer) Extensions() []string { return p.FileExtensions } +// SanitizerRules implements markup.Renderer +func (p *Renderer) SanitizerRules() []setting.MarkupSanitizerRule { + return p.MarkupSanitizerRules +} + func envMark(envName string) string { if runtime.GOOS == "windows" { return "%" + envName + "%" |