diff --git a/modules/templates/helper.go b/modules/templates/helper.go index 454bd648a..7fd0ed35a 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 2b756cd88..7759a2cd6 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 1cce9169d..3703301e1 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 079c6f52a..23fd91b0b 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"}}
    {{if .Issue.Milestone}} - {{.Issue.Milestone.Name | Sanitize}} + {{.Issue.Milestone.Name}} {{end}}
    diff --git a/templates/repo/wiki/view.tmpl b/templates/repo/wiki/view.tmpl index 8eab1ac07..79f17f5de 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}}
    @@ -21,7 +21,7 @@