{{.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 0c56ae0e0..b03128a0b 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 9a1a984b6..b9aa4e956 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}}