ISSUE-203

This commit is contained in:
Andrea Spacca 2019-05-11 14:47:58 +02:00
parent cc401433a6
commit 9148f20aee

View file

@ -133,8 +133,7 @@ func (s *Server) previewHandler(w http.ResponseWriter, r *http.Request) {
}
if strings.HasPrefix(contentType, "text/x-markdown") || strings.HasPrefix(contentType, "text/markdown") {
escapedData := html.EscapeString(string(data))
unsafe := blackfriday.Run([]byte(escapedData))
unsafe := blackfriday.Run(data)
output := bluemonday.UGCPolicy().SanitizeBytes(unsafe)
content = html_template.HTML(output)
} else if strings.HasPrefix(contentType, "text/plain") {