Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
update markdown xss
  • Loading branch information
aichy126 committed Mar 10, 2023
1 parent e184986 commit c3743ba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/converter/markdown.go
Expand Up @@ -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
Expand Down

0 comments on commit c3743ba

Please sign in to comment.