A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
update markdown xss
aichy126c3743bad4f2a
diff --git a/pkg/converter/markdown.go b/pkg/converter/markdown.goindex b1e2a418..f6e76c45 100644--- a/pkg/converter/markdown.go+++ b/pkg/converter/markdown.go@@ -32,7 +32,10 @@ func Markdown2HTML(source string) string {log.Error(err)return source}- return buf.String()+ html := buf.String()+ filter := bluemonday.NewPolicy()+ html = filter.Sanitize(html)+ return html}// Markdown2BasicHTML convert markdown to html ,Only basic syntax can be used