Sanitation fix from Gogs (#1461)

* Santiation fix from Gogs

* Linting

* Fix build-errors

* still not working

* Fix all the things!

* gofmt

* Add code-injection checks
This commit is contained in:
Kim "BKC" Carlbäcker 2017-04-13 04:52:24 +02:00 committed by Lunny Xiao
parent 21290d4e80
commit d409d3ab57
7 changed files with 118 additions and 27 deletions

View file

@ -164,7 +164,7 @@ func Safe(raw string) template.HTML {
// Str2html render Markdown text to HTML
func Str2html(raw string) template.HTML {
return template.HTML(markdown.Sanitizer.Sanitize(raw))
return template.HTML(markdown.Sanitize(raw))
}
// List traversings the list