소스 검색

ISSUE-203

tags/v1.1.0
Andrea Spacca 5 년 전
부모
커밋
9148f20aee
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. +1
    -2
      server/handlers.go

+ 1
- 2
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") {


불러오는 중...
취소
저장