diff --git a/modules/templates/helper.go b/modules/templates/helper.go
index 454bd648a3..7fd0ed35a3 100644
--- a/modules/templates/helper.go
+++ b/modules/templates/helper.go
@@ -16,16 +16,15 @@ import (
"strings"
"time"
- "github.com/microcosm-cc/bluemonday"
- "golang.org/x/net/html/charset"
- "golang.org/x/text/transform"
- "gopkg.in/editorconfig/editorconfig-core-go.v1"
-
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/markup"
"code.gitea.io/gitea/modules/setting"
+
+ "golang.org/x/net/html/charset"
+ "golang.org/x/text/transform"
+ "gopkg.in/editorconfig/editorconfig-core-go.v1"
)
// NewFuncMap returns functions for injecting to templates
@@ -67,7 +66,6 @@ func NewFuncMap() []template.FuncMap {
"AvatarLink": base.AvatarLink,
"Safe": Safe,
"SafeJS": SafeJS,
- "Sanitize": bluemonday.UGCPolicy().Sanitize,
"Str2html": Str2html,
"TimeSince": base.TimeSince,
"RawTimeSince": base.RawTimeSince,
diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl
index 2b756cd88e..7759a2cd62 100644
--- a/templates/repo/issue/list.tmpl
+++ b/templates/repo/issue/list.tmpl
@@ -35,7 +35,7 @@
@@ -49,7 +49,7 @@
@@ -117,7 +117,7 @@
@@ -135,7 +135,7 @@
{{range .Milestones}}
- {{.Name | Sanitize}}
+ {{.Name}}
{{end}}
@@ -175,7 +175,7 @@
{{.Ref}}
{{end}}
{{range .Labels}}
- {{.Name | Sanitize}}
+ {{.Name}}
{{end}}
{{if .NumComments}}
@@ -186,7 +186,7 @@
{{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.HomeLink .Poster.Name | Safe}}
{{if .Milestone}}
- {{.Milestone.Name | Sanitize}}
+ {{.Milestone.Name}}
{{end}}
{{if .Assignee}}
diff --git a/templates/repo/issue/milestones.tmpl b/templates/repo/issue/milestones.tmpl
index 1cce9169d7..3703301e19 100644
--- a/templates/repo/issue/milestones.tmpl
+++ b/templates/repo/issue/milestones.tmpl
@@ -43,7 +43,7 @@
{{range .Milestones}}
- {{.Name | Sanitize}}
+ {{.Name}}
diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl
index 079c6f52ab..23fd91b0bd 100644
--- a/templates/repo/issue/view_content/sidebar.tmpl
+++ b/templates/repo/issue/view_content/sidebar.tmpl
@@ -18,7 +18,7 @@
{{.i18n.Tr "repo.issues.new.no_label"}}
{{range .Labels}}
{{end}}
@@ -40,7 +40,7 @@
{{.i18n.Tr "repo.issues.new.open_milestone"}}
{{range .OpenMilestones}}
-
{{.Name | Sanitize}}
+
{{.Name}}
{{end}}
{{end}}
{{if .ClosedMilestones}}
@@ -50,7 +50,7 @@
{{.i18n.Tr "repo.issues.new.closed_milestone"}}
{{range .ClosedMilestones}}
- {{.Name | Sanitize}}
+ {{.Name}}
{{end}}
{{end}}
@@ -59,7 +59,7 @@
{{.i18n.Tr "repo.issues.new.no_milestone"}}
diff --git a/templates/repo/wiki/view.tmpl b/templates/repo/wiki/view.tmpl
index 8eab1ac07b..79f17f5de9 100644
--- a/templates/repo/wiki/view.tmpl
+++ b/templates/repo/wiki/view.tmpl
@@ -1,7 +1,7 @@
{{template "base/head" .}}
{{template "repo/header" .}}
- {{ $title := .title | Sanitize}}
+ {{ $title := .title}}