sanitize markdown
@@ -8,6 +8,7 @@ import (
"text/template"
"github.com/gorilla/mux"
+ "github.com/microcosm-cc/bluemonday"
"github.com/russross/blackfriday"
)
@@ -59,6 +60,7 @@ func generateHTML() {
input, _ := ioutil.ReadFile(readmePath)
body := string(
+ bluemonday.UGCPolicy().SanitizeBytes(
blackfriday.Markdown(
input,
blackfriday.HtmlRenderer(
@@ -68,6 +70,7 @@ func generateHTML() {
),
bfMDOpts,
),
+ ),
)
c := &content{Body: body}
