mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 10:41:03 +01:00
Upgrade the markdown parser vendor. Prev Commit: Update to v8.4.4, new mvc features. Read HISTORY.md.
Former-commit-id: 194b8fb1ba68a046e0e89a42a3e79b2cd319f14b
This commit is contained in:
parent
591806795e
commit
a2de506f80
|
@ -3,7 +3,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/kataras/iris/_examples/mvc/login-example/user"
|
"github.com/kataras/iris/_examples/mvc/login/user"
|
||||||
|
|
||||||
"github.com/kataras/iris"
|
"github.com/kataras/iris"
|
||||||
"github.com/kataras/iris/sessions"
|
"github.com/kataras/iris/sessions"
|
||||||
|
@ -11,6 +11,8 @@ import (
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
app := iris.New()
|
app := iris.New()
|
||||||
|
// You got full debug messages, useful when using MVC and you want to make
|
||||||
|
// sure that your code is compatible with the Iris' MVC Architecture.
|
||||||
app.Logger().SetLevel("debug")
|
app.Logger().SetLevel("debug")
|
||||||
|
|
||||||
app.RegisterView(iris.HTML("./views", ".html").Layout("shared/layout.html"))
|
app.RegisterView(iris.HTML("./views", ".html").Layout("shared/layout.html"))
|
||||||
|
|
|
@ -2053,7 +2053,7 @@ func (ctx *context) XML(v interface{}, opts ...XML) (int, error) {
|
||||||
|
|
||||||
// WriteMarkdown parses the markdown to html and renders these contents to the writer.
|
// WriteMarkdown parses the markdown to html and renders these contents to the writer.
|
||||||
func WriteMarkdown(writer io.Writer, markdownB []byte, options Markdown) (int, error) {
|
func WriteMarkdown(writer io.Writer, markdownB []byte, options Markdown) (int, error) {
|
||||||
buf := blackfriday.MarkdownCommon(markdownB)
|
buf := blackfriday.Run(markdownB)
|
||||||
if options.Sanitize {
|
if options.Sanitize {
|
||||||
buf = bluemonday.UGCPolicy().SanitizeBytes(buf)
|
buf = bluemonday.UGCPolicy().SanitizeBytes(buf)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user