1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-12 12:38:20 +00:00

[backport] fix sanitation (#1646)

* Santiation fix from Gogs

- Add code-injection checks

* Fix SSH-breakage
This commit is contained in:
Kim "BKC" Carlbäcker
2017-04-30 11:55:16 +02:00
committed by Lunny Xiao
parent 2482c67e2b
commit 473df53533
7 changed files with 115 additions and 27 deletions

View File

@@ -152,7 +152,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