1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00

No printing

Former-commit-id: db031cc35efa9778bec182d29f57084ca266aa71 [formerly 7c2c48966008ce4ade933136e48ed9d5575ba19e] [formerly cd32905773ee78393e25e9fe4245c34930e8cbad [formerly 20d70cccc3]]
Former-commit-id: d2190cd8de586be4f99335c6d548616281a4742d [formerly f2c0bcfd820a65e5601cf5087cb51f13b2e96ef4]
Former-commit-id: d9f6908918b31155756dc53876310dcfed86c7c8
This commit is contained in:
Zack Scholl 2016-02-10 15:30:01 -05:00
parent ec20eef484
commit cc4f2b58ef

View File

@ -1,7 +1,6 @@
package main
import (
"fmt"
"html/template"
"io/ioutil"
"net/http"
@ -93,9 +92,7 @@ func serveStaticFile(c *gin.Context, option string) {
}
func renderMarkdown(c *gin.Context, currentText string, title string, versions []versionsInfo) {
fmt.Println(currentText)
unsafe := blackfriday.MarkdownCommon([]byte(currentText))
fmt.Println(string(unsafe))
pClean := bluemonday.UGCPolicy()
pClean.AllowElements("img")
pClean.AllowAttrs("alt").OnElements("img")