sum7/warehost
sum7
/
warehost
Archived
1
0
Fork 0

warehost-web unsafe

This commit is contained in:
Martin Geno 2016-11-21 21:14:01 +01:00
parent bca651eece
commit 10c51a2189
1 changed files with 3 additions and 2 deletions

View File

@ -6,7 +6,7 @@ import (
"os" "os"
"text/template" "text/template"
"github.com/microcosm-cc/bluemonday" //"github.com/microcosm-cc/bluemonday"
"github.com/russross/blackfriday" "github.com/russross/blackfriday"
liblog "dev.sum7.eu/sum7/warehost/lib/log" liblog "dev.sum7.eu/sum7/warehost/lib/log"
@ -80,7 +80,8 @@ func handlerfunc(w http.ResponseWriter, r *http.Request) {
page.Menu = menu page.Menu = menu
unsafe := blackfriday.MarkdownCommon([]byte(page.Content)) unsafe := blackfriday.MarkdownCommon([]byte(page.Content))
page.Content = string(bluemonday.UGCPolicy().SanitizeBytes(unsafe)) //page.Content = string(bluemonday.UGCPolicy().SanitizeBytes(unsafe))
page.Content = string(unsafe)
i := TemplateInfo{ i := TemplateInfo{
Website: website, Website: website,
Host: host, Host: host,