{{.i18n.Tr "repo.wiki.delete_page_notice_1" .title | Safe}}
+{{.i18n.Tr "repo.wiki.delete_page_notice_1" $title | Safe}}
diff --git a/modules/templates/helper.go b/modules/templates/helper.go index c256455399..e844cacd39 100644 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -15,6 +15,7 @@ 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" @@ -61,6 +62,7 @@ func NewFuncMap() []template.FuncMap { }, "AvatarLink": base.AvatarLink, "Safe": Safe, + "Sanitize": bluemonday.UGCPolicy().Sanitize, "Str2html": Str2html, "TimeSince": base.TimeSince, "RawTimeSince": base.RawTimeSince, diff --git a/templates/repo/wiki/view.tmpl b/templates/repo/wiki/view.tmpl index b8b0d2702a..a8f1b508c7 100644 --- a/templates/repo/wiki/view.tmpl +++ b/templates/repo/wiki/view.tmpl @@ -1,6 +1,7 @@ {{template "base/head" .}}
{{.i18n.Tr "repo.wiki.delete_page_notice_1" .title | Safe}}
+{{.i18n.Tr "repo.wiki.delete_page_notice_1" $title | Safe}}