Pārlūkot izejas kodu

ISSUE-203

tags/v1.1.0
Andrea Spacca pirms 5 gadiem
vecāks
revīzija
9148f20aee
1 mainītis faili ar 1 papildinājumiem un 2 dzēšanām
  1. +1
    -2
      server/handlers.go

+ 1
- 2
server/handlers.go Parādīt failu

@@ -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") {


Notiek ielāde…
Atcelt
Saglabāt