From 9148f20aee19213a8074da91af10f0b25394bbff Mon Sep 17 00:00:00 2001 From: Andrea Spacca Date: Sat, 11 May 2019 14:47:58 +0200 Subject: [PATCH] ISSUE-203 --- server/handlers.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/handlers.go b/server/handlers.go index a41cb6f..7793cad 100644 --- a/server/handlers.go +++ b/server/handlers.go @@ -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") {