From db3f0048d80f4f7aaa903d367ace67b8cd0389dc Mon Sep 17 00:00:00 2001
From: Unknwon
Date: Mon, 10 Dec 2018 22:23:56 -0500
Subject: [PATCH] templates: rename template function Str2html -> Str2HTML
---
pkg/template/template.go | 2 +-
templates/admin/dashboard.tmpl | 2 +-
templates/base/alert.tmpl | 8 ++--
templates/explore/repo_list.tmpl | 2 +-
templates/mail/issue/comment.tmpl | 2 +-
templates/mail/issue/mention.tmpl | 2 +-
templates/org/settings/delete.tmpl | 2 +-
templates/org/team/sidebar.tmpl | 8 ++--
templates/repo/bare.tmpl | 2 +-
templates/repo/commits_table.tmpl | 2 +-
templates/repo/diff/box.tmpl | 2 +-
templates/repo/diff/page.tmpl | 2 +-
templates/repo/editor/commit_form.tmpl | 2 +-
templates/repo/home.tmpl | 2 +-
templates/repo/issue/milestones.tmpl | 4 +-
templates/repo/issue/view_content.tmpl | 6 +--
templates/repo/issue/view_title.tmpl | 4 +-
templates/repo/release/list.tmpl | 4 +-
templates/repo/settings/githooks.tmpl | 2 +-
templates/repo/settings/options.tmpl | 2 +-
templates/repo/settings/protected_branch.tmpl | 2 +-
templates/repo/settings/webhook/dingtalk.tmpl | 2 +-
templates/repo/settings/webhook/discord.tmpl | 2 +-
templates/repo/settings/webhook/gogs.tmpl | 2 +-
templates/repo/settings/webhook/list.tmpl | 2 +-
templates/repo/settings/webhook/settings.tmpl | 6 +--
templates/repo/settings/webhook/slack.tmpl | 2 +-
templates/repo/view_file.tmpl | 4 +-
templates/repo/view_list.tmpl | 4 +-
templates/repo/wiki/view.tmpl | 2 +-
templates/user/auth/activate.tmpl | 6 +--
templates/user/auth/forgot_passwd.tmpl | 2 +-
templates/user/auth/login.tmpl | 2 +-
templates/user/dashboard/feeds.tmpl | 40 +++++++++----------
templates/user/settings/delete.tmpl | 2 +-
templates/user/settings/sshkeys.tmpl | 2 +-
36 files changed, 72 insertions(+), 72 deletions(-)
diff --git a/pkg/template/template.go b/pkg/template/template.go
index 6e9c4a323..eb85ca7b0 100644
--- a/pkg/template/template.go
+++ b/pkg/template/template.go
@@ -64,7 +64,7 @@ func NewFuncMap() []template.FuncMap {
"AppendAvatarSize": tool.AppendAvatarSize,
"Safe": Safe,
"Sanitize": bluemonday.UGCPolicy().Sanitize,
- "Str2html": Str2HTML, // TODO: Rename to Str2HTML
+ "Str2HTML": Str2HTML,
"NewLine2br": NewLine2br,
"TimeSince": tool.TimeSince,
"RawTimeSince": tool.RawTimeSince,
diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl
index 55d9a8917..968ed78c4 100644
--- a/templates/admin/dashboard.tmpl
+++ b/templates/admin/dashboard.tmpl
@@ -10,7 +10,7 @@
- {{.i18n.Tr "admin.dashboard.statistic_info" .Stats.Counter.User .Stats.Counter.Org .Stats.Counter.PublicKey .Stats.Counter.Repo .Stats.Counter.Watch .Stats.Counter.Star .Stats.Counter.Action .Stats.Counter.Access .Stats.Counter.Issue .Stats.Counter.Comment .Stats.Counter.Oauth .Stats.Counter.Follow .Stats.Counter.Mirror .Stats.Counter.Release .Stats.Counter.LoginSource .Stats.Counter.Webhook .Stats.Counter.Milestone .Stats.Counter.Label .Stats.Counter.HookTask .Stats.Counter.Team .Stats.Counter.UpdateTask .Stats.Counter.Attachment | Str2html}}
+ {{.i18n.Tr "admin.dashboard.statistic_info" .Stats.Counter.User .Stats.Counter.Org .Stats.Counter.PublicKey .Stats.Counter.Repo .Stats.Counter.Watch .Stats.Counter.Star .Stats.Counter.Action .Stats.Counter.Access .Stats.Counter.Issue .Stats.Counter.Comment .Stats.Counter.Oauth .Stats.Counter.Follow .Stats.Counter.Mirror .Stats.Counter.Release .Stats.Counter.LoginSource .Stats.Counter.Webhook .Stats.Counter.Milestone .Stats.Counter.Label .Stats.Counter.HookTask .Stats.Counter.Team .Stats.Counter.UpdateTask .Stats.Counter.Attachment | Str2HTML}}
diff --git a/templates/base/alert.tmpl b/templates/base/alert.tmpl
index 5248d7a82..ec1a45bd4 100644
--- a/templates/base/alert.tmpl
+++ b/templates/base/alert.tmpl
@@ -1,20 +1,20 @@
{{if .Flash.ErrorMsg}}
{{.NumForks}}
- {{if .Description}}
{{end}}
{{if .Flash.WarningMsg}}
{{end}}
{{if .Flash.SuccessMsg}}
{{end}}
{{if .Flash.InfoMsg}}
{{end}}
diff --git a/templates/explore/repo_list.tmpl b/templates/explore/repo_list.tmpl
index f215c21c3..4cf1aed5b 100644
--- a/templates/explore/repo_list.tmpl
+++ b/templates/explore/repo_list.tmpl
@@ -21,7 +21,7 @@
{{.Description | Str2html}}
{{end}} + {{if .Description}}{{.Description | Str2HTML}}
{{end}}{{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Updated $.i18n.Lang}}
diff --git a/templates/mail/issue/comment.tmpl b/templates/mail/issue/comment.tmpl index 5dabb5195..0a5efa3d1 100644 --- a/templates/mail/issue/comment.tmpl +++ b/templates/mail/issue/comment.tmpl @@ -6,7 +6,7 @@ -{{.Body | Str2html}}
+{{.Body | Str2HTML}}
---
diff --git a/templates/mail/issue/mention.tmpl b/templates/mail/issue/mention.tmpl
index 982bfe137..6800fdf65 100644
--- a/templates/mail/issue/mention.tmpl
+++ b/templates/mail/issue/mention.tmpl
@@ -7,7 +7,7 @@
@{{.Doer.DisplayName}} mentioned you:
-{{.Body | Str2html}}
+{{.Body | Str2HTML}}
---
diff --git a/templates/org/settings/delete.tmpl b/templates/org/settings/delete.tmpl
index 6f5aa54ec..72bb1430c 100644
--- a/templates/org/settings/delete.tmpl
+++ b/templates/org/settings/delete.tmpl
@@ -11,7 +11,7 @@