mirror of https://gitee.com/answerdev/answer.git
update markdown
This commit is contained in:
parent
f28b743519
commit
78850be999
|
@ -46,7 +46,7 @@ func Markdown2HTML(source string) string {
|
|||
func Markdown2BasicHTML(source string) string {
|
||||
content := Markdown2HTML(source)
|
||||
filter := bluemonday.NewPolicy()
|
||||
filter.AllowElements("p", "b", "br")
|
||||
filter.AllowElements("p", "b", "br", "strong", "em")
|
||||
filter.AllowAttrs("src").OnElements("img")
|
||||
filter.AddSpaceWhenStrippingTag(true)
|
||||
content = filter.Sanitize(content)
|
||||
|
|
Loading…
Reference in New Issue