mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
No printing
This commit is contained in:
parent
01b8faa71b
commit
20d70cccc3
@ -1,7 +1,6 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"html/template"
|
"html/template"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
@ -93,9 +92,7 @@ func serveStaticFile(c *gin.Context, option string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func renderMarkdown(c *gin.Context, currentText string, title string, versions []versionsInfo) {
|
func renderMarkdown(c *gin.Context, currentText string, title string, versions []versionsInfo) {
|
||||||
fmt.Println(currentText)
|
|
||||||
unsafe := blackfriday.MarkdownCommon([]byte(currentText))
|
unsafe := blackfriday.MarkdownCommon([]byte(currentText))
|
||||||
fmt.Println(string(unsafe))
|
|
||||||
pClean := bluemonday.UGCPolicy()
|
pClean := bluemonday.UGCPolicy()
|
||||||
pClean.AllowElements("img")
|
pClean.AllowElements("img")
|
||||||
pClean.AllowAttrs("alt").OnElements("img")
|
pClean.AllowAttrs("alt").OnElements("img")
|
||||||
|
Loading…
Reference in New Issue
Block a user