Browse Source

templates: rename template function Str2html -> Str2HTML

Unknwon 5 years ago
parent
commit
db3f0048d8
36 changed files with 72 additions and 72 deletions
  1. 1 1
      pkg/template/template.go
  2. 1 1
      templates/admin/dashboard.tmpl
  3. 4 4
      templates/base/alert.tmpl
  4. 1 1
      templates/explore/repo_list.tmpl
  5. 1 1
      templates/mail/issue/comment.tmpl
  6. 1 1
      templates/mail/issue/mention.tmpl
  7. 1 1
      templates/org/settings/delete.tmpl
  8. 4 4
      templates/org/team/sidebar.tmpl
  9. 1 1
      templates/repo/bare.tmpl
  10. 1 1
      templates/repo/commits_table.tmpl
  11. 1 1
      templates/repo/diff/box.tmpl
  12. 1 1
      templates/repo/diff/page.tmpl
  13. 1 1
      templates/repo/editor/commit_form.tmpl
  14. 1 1
      templates/repo/home.tmpl
  15. 2 2
      templates/repo/issue/milestones.tmpl
  16. 3 3
      templates/repo/issue/view_content.tmpl
  17. 2 2
      templates/repo/issue/view_title.tmpl
  18. 2 2
      templates/repo/release/list.tmpl
  19. 1 1
      templates/repo/settings/githooks.tmpl
  20. 1 1
      templates/repo/settings/options.tmpl
  21. 1 1
      templates/repo/settings/protected_branch.tmpl
  22. 1 1
      templates/repo/settings/webhook/dingtalk.tmpl
  23. 1 1
      templates/repo/settings/webhook/discord.tmpl
  24. 1 1
      templates/repo/settings/webhook/gogs.tmpl
  25. 1 1
      templates/repo/settings/webhook/list.tmpl
  26. 3 3
      templates/repo/settings/webhook/settings.tmpl
  27. 1 1
      templates/repo/settings/webhook/slack.tmpl
  28. 2 2
      templates/repo/view_file.tmpl
  29. 2 2
      templates/repo/view_list.tmpl
  30. 1 1
      templates/repo/wiki/view.tmpl
  31. 3 3
      templates/user/auth/activate.tmpl
  32. 1 1
      templates/user/auth/forgot_passwd.tmpl
  33. 1 1
      templates/user/auth/login.tmpl
  34. 20 20
      templates/user/dashboard/feeds.tmpl
  35. 1 1
      templates/user/settings/delete.tmpl
  36. 1 1
      templates/user/settings/sshkeys.tmpl

+ 1 - 1
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,

+ 1 - 1
templates/admin/dashboard.tmpl

@@ -10,7 +10,7 @@
 				</h4>
 				<div class="ui attached segment">
 					<p>
-						{{.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}}
 					</p>
 				</div>
 				<h4 class="ui top attached header">

+ 4 - 4
templates/base/alert.tmpl

@@ -1,20 +1,20 @@
 {{if .Flash.ErrorMsg}}
 	<div class="ui negative message">
-		<p>{{.Flash.ErrorMsg | Str2html}}</p>
+		<p>{{.Flash.ErrorMsg | Str2HTML}}</p>
 	</div>
 {{end}}
 {{if .Flash.WarningMsg}}
 	<div class="ui warning message">
-		<p>{{.Flash.WarningMsg | Str2html}}</p>
+		<p>{{.Flash.WarningMsg | Str2HTML}}</p>
 	</div>
 {{end}}
 {{if .Flash.SuccessMsg}}
 	<div class="ui positive message">
-		<p>{{.Flash.SuccessMsg | Str2html}}</p>
+		<p>{{.Flash.SuccessMsg | Str2HTML}}</p>
 	</div>
 {{end}}
 {{if .Flash.InfoMsg}}
 	<div class="ui info message">
-		<p>{{.Flash.InfoMsg | Str2html}}</p>
+		<p>{{.Flash.InfoMsg | Str2HTML}}</p>
 	</div>
 {{end}}

+ 1 - 1
templates/explore/repo_list.tmpl

@@ -21,7 +21,7 @@
 							<span class="text grey"><i class="octicon octicon-git-branch"></i> {{.NumForks}}</span>
 						</div>
 					</div>
-					{{if .Description}}<p class="has-emoji">{{.Description | Str2html}}</p>{{end}}
+					{{if .Description}}<p class="has-emoji">{{.Description | Str2HTML}}</p>{{end}}
 					<p class="time">{{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Updated $.i18n.Lang}}</p>
 				</div>
 			</div>

+ 1 - 1
templates/mail/issue/comment.tmpl

@@ -6,7 +6,7 @@
 </head>
 
 <body>
-	<p>{{.Body | Str2html}}</p>
+	<p>{{.Body | Str2HTML}}</p>
 	<p>
 		---
 		<br>

+ 1 - 1
templates/mail/issue/mention.tmpl

@@ -7,7 +7,7 @@
 
 <body>
 	<p>@{{.Doer.DisplayName}} mentioned you:</p>
-	<p>{{.Body | Str2html}}</p>
+	<p>{{.Body | Str2HTML}}</p>
 	<p>
 		---
 		<br>

+ 1 - 1
templates/org/settings/delete.tmpl

@@ -11,7 +11,7 @@
 				</h4>
 				<div class="ui attached warning segment">
 					<div class="ui red message">
-						<p class="text left"><i class="octicon octicon-alert"></i> {{.i18n.Tr "org.settings.delete_prompt" | Str2html}}</p>
+						<p class="text left"><i class="octicon octicon-alert"></i> {{.i18n.Tr "org.settings.delete_prompt" | Str2HTML}}</p>
 					</div>
 					<form class="ui form" id="delete-form" action="{{.Link}}" method="post">
 						{{.CSRFTokenHTML}}

+ 4 - 4
templates/org/team/sidebar.tmpl

@@ -23,13 +23,13 @@
 		</div>
 		<div class="item">
 			{{if eq .Team.LowerName "owners"}}
-				{{.i18n.Tr "org.teams.owners_permission_desc" | Str2html}}
+				{{.i18n.Tr "org.teams.owners_permission_desc" | Str2HTML}}
 			{{else if (eq .Team.Authorize 1)}}
-				{{.i18n.Tr "org.teams.read_permission_desc" | Str2html}}
+				{{.i18n.Tr "org.teams.read_permission_desc" | Str2HTML}}
 			{{else if (eq .Team.Authorize 2)}}
-				{{.i18n.Tr "org.teams.write_permission_desc" | Str2html}}
+				{{.i18n.Tr "org.teams.write_permission_desc" | Str2HTML}}
 			{{else if (eq .Team.Authorize 3)}}
-				{{.i18n.Tr "org.teams.admin_permission_desc" | Str2html}}
+				{{.i18n.Tr "org.teams.admin_permission_desc" | Str2HTML}}
 			{{end}}
 		</div>
 	</div>

+ 1 - 1
templates/repo/bare.tmpl

@@ -11,7 +11,7 @@
 					</h4>
 					<div class="ui attached guide table segment">
 						<div class="item">
-							<h3>{{.i18n.Tr "repo.clone_this_repo"}} <small>{{.i18n.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository" | Str2html}}</small></h3>
+							<h3>{{.i18n.Tr "repo.clone_this_repo"}} <small>{{.i18n.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository" | Str2HTML}}</small></h3>
 							<div class="ui action small input">
 								{{if not $.DisableHTTP}}
 									<button class="ui basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">

+ 1 - 1
templates/repo/commits_table.tmpl

@@ -47,7 +47,7 @@
 							{{else}}
 								<a rel="nofollow" class="ui sha label" href="{{AppSubURL}}/{{$.Username}}/{{$.Reponame}}/commit/{{.ID}}">{{ShortSHA1 .ID.String}}</a>
 							{{end}}
-							<span class="{{if gt .ParentCount 1}}grey text {{end}} has-emoji">{{RenderCommitMessage false .Summary $.RepoLink $.Repository.ComposeMetas | Str2html}}</span>
+							<span class="{{if gt .ParentCount 1}}grey text {{end}} has-emoji">{{RenderCommitMessage false .Summary $.RepoLink $.Repository.ComposeMetas | Str2HTML}}</span>
 						</td>
 						<td class="grey text right aligned">{{TimeSince .Author.When $.Lang}}</td>
 					</tr>

+ 1 - 1
templates/repo/diff/box.tmpl

@@ -4,7 +4,7 @@
 	<div class="diff-detail-box diff-box">
 		<div>
 			<i class="fa fa-retweet"></i>
-			{{.i18n.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}}
+			{{.i18n.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2HTML}}
 			<div class="ui right">
 				<a class="ui tiny basic toggle button" href="?style={{if .IsSplitStyle}}unified{{else}}split{{end}}">{{ if .IsSplitStyle }}{{.i18n.Tr "repo.diff.show_unified_view"}}{{else}}{{.i18n.Tr "repo.diff.show_split_view"}}{{end}}</a>
 				<a class="ui tiny basic toggle button" data-target="#diff-files">{{.i18n.Tr "repo.diff.show_diff_stats"}}</a>

+ 1 - 1
templates/repo/diff/page.tmpl

@@ -9,7 +9,7 @@
 				<a class="ui floated right blue tiny button" href="{{EscapePound .SourcePath}}">
 					{{.i18n.Tr "repo.diff.browse_source"}}
 				</a>
-				{{RenderCommitMessage true .Commit.Message $.RepoLink $.Repository.ComposeMetas | Str2html}}
+				{{RenderCommitMessage true .Commit.Message $.RepoLink $.Repository.ComposeMetas | Str2HTML}}
 			</div>
 			<div class="ui attached info segment">
 				{{if .Author}}

+ 1 - 1
templates/repo/editor/commit_form.tmpl

@@ -14,7 +14,7 @@
 					<input type="radio" class="js-quick-pull-choice-option" name="commit_choice" value="direct" {{if eq .commit_choice "direct"}}checked{{end}}>
 					<label>
 						<i class="octicon octicon-git-commit" height="16" width="14"></i>
-						{{$branchName := .BranchName | Str2html}}
+						{{$branchName := .BranchName | Str2HTML}}
 						{{.i18n.Tr "repo.editor.commit_directly_to_this_branch" $branchName | Safe}}
 					</label>
 				</div>

+ 1 - 1
templates/repo/home.tmpl

@@ -5,7 +5,7 @@
 		{{template "base/alert" .}}
 		{{if .PageIsRepoHome}}
 			<p id="repo-desc">
-				{{if .Repository.Description}}<span class="description has-emoji">{{.Repository.Description | NewLine2br | Str2html}}</span>{{else}}<span class="no-description text-italic">{{.i18n.Tr "repo.no_desc"}}</span>{{end}}
+				{{if .Repository.Description}}<span class="description has-emoji">{{.Repository.Description | NewLine2br | Str2HTML}}</span>{{else}}<span class="no-description text-italic">{{.i18n.Tr "repo.no_desc"}}</span>{{end}}
 				<a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a>
 			</p>
 			<div class="ui segment" id="git-stats">

+ 2 - 2
templates/repo/issue/milestones.tmpl

@@ -35,7 +35,7 @@
 					<div class="meta">
 						{{ $closedDate:= TimeSince .ClosedDate $.Lang }}
 						{{if .IsClosed}}
-							<span class="octicon octicon-clock"></span> {{$.i18n.Tr "repo.milestones.closed" $closedDate|Str2html}}
+							<span class="octicon octicon-clock"></span> {{$.i18n.Tr "repo.milestones.closed" $closedDate|Str2HTML}}
 						{{else}}
 							<span class="octicon octicon-calendar"></span>
 							{{if .DeadlineString}}
@@ -62,7 +62,7 @@
 					{{end}}
 					{{if .Content}}
 						<div class="content">
-							{{.RenderedContent|Str2html}}
+							{{.RenderedContent|Str2HTML}}
 						</div>
 					{{end}}
 				</li>

+ 3 - 3
templates/repo/issue/view_content.tmpl

@@ -29,7 +29,7 @@
 					<div class="ui attached segment">
 						<div class="render-content markdown has-emoji">
 							{{if .Issue.RenderedContent}}
-								{{.Issue.RenderedContent|Str2html}}
+								{{.Issue.RenderedContent|Str2HTML}}
 							{{else}}
 								<span class="no-content">{{.i18n.Tr "repo.issues.no_content"}}</span>
 							{{end}}
@@ -90,7 +90,7 @@
 							<div class="ui attached segment">
 								<div class="render-content markdown has-emoji">
 									{{if .RenderedContent}}
-										{{.RenderedContent | Str2html}}
+										{{.RenderedContent | Str2HTML}}
 									{{else}}
 										<span class="no-content">{{$.i18n.Tr "repo.issues.no_content"}}</span>
 									{{end}}
@@ -140,7 +140,7 @@
 						<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.DisplayName}}</a> {{$.i18n.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}}</span>
 						<div class="detail">
 							<span class="octicon octicon-git-commit"></span>
-							<span class="text grey">{{.Content | Str2html}}</span>
+							<span class="text grey">{{.Content | Str2HTML}}</span>
 						</div>
 					</div>
 				{{end}}

+ 2 - 2
templates/repo/issue/view_title.tmpl

@@ -28,10 +28,10 @@
 		{{if .Issue.PullRequest.HasMerged}}
 			{{ $mergedStr:= TimeSince .Issue.PullRequest.Merged $.Lang }}
 			<a {{if gt .Issue.PullRequest.Merger.ID 0}}href="{{.Issue.PullRequest.Merger.HomeLink}}"{{end}}>{{.Issue.PullRequest.Merger.Name}}</a>
-			<span class="pull-desc">{{$.i18n.Tr "repo.pulls.merged_title_desc" .NumCommits .HeadTarget .BaseTarget $mergedStr | Str2html}}</span>
+			<span class="pull-desc">{{$.i18n.Tr "repo.pulls.merged_title_desc" .NumCommits .HeadTarget .BaseTarget $mergedStr | Str2HTML}}</span>
 		{{else}}
 			<a {{if gt .Issue.Poster.ID 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>{{.Issue.Poster.Name}}</a>
-			<span class="pull-desc">{{$.i18n.Tr "repo.pulls.title_desc" .NumCommits .HeadTarget .BaseTarget | Str2html}}</span>
+			<span class="pull-desc">{{$.i18n.Tr "repo.pulls.title_desc" .NumCommits .HeadTarget .BaseTarget | Str2HTML}}</span>
 		{{end}}
 	{{else}}
 		{{ $createdStr:= TimeSince .Issue.Created $.Lang }}

+ 2 - 2
templates/repo/release/list.tmpl

@@ -43,10 +43,10 @@
 									<a href="{{AppSubURL}}/{{.Publisher.Name}}">{{.Publisher.DisplayName}}</a>
 								</span>
 								{{if .Created}}<span class="time">{{TimeSince .Created $.Lang}}</span>{{end}}
-								<span class="ahead">{{$.i18n.Tr "repo.release.ahead" .NumCommitsBehind .Target | Str2html}}</span>
+								<span class="ahead">{{$.i18n.Tr "repo.release.ahead" .NumCommitsBehind .Target | Str2HTML}}</span>
 							</p>
 							<div class="markdown desc">
-								{{Str2html .Note}}
+								{{Str2HTML .Note}}
 							</div>
 							<div class="download">
 								<h2>{{$.i18n.Tr "repo.release.downloads"}}</h2>

+ 1 - 1
templates/repo/settings/githooks.tmpl

@@ -12,7 +12,7 @@
 				<div class="ui attached table segment">
 					<div class="ui hook list">
 						<div class="item">
-							{{.i18n.Tr "repo.settings.githooks_desc" | Str2html}}
+							{{.i18n.Tr "repo.settings.githooks_desc" | Str2HTML}}
 						</div>
 						{{range .Hooks}}
 							<div class="item">

+ 1 - 1
templates/repo/settings/options.tmpl

@@ -184,7 +184,7 @@
 								<div class="field">
 									<label for="tracker_url_format">{{.i18n.Tr "repo.settings.tracker_url_format"}}</label>
 									<input id="tracker_url_format" name="tracker_url_format" type="url" value="{{.Repository.ExternalTrackerFormat}}" placeholder="e.g. https://github.com/{user}/{repo}/issues/{index}">
-									<p class="help">{{.i18n.Tr "repo.settings.tracker_url_format_desc" | Str2html}}</p>
+									<p class="help">{{.i18n.Tr "repo.settings.tracker_url_format_desc" | Str2HTML}}</p>
 								</div>
 								<div class="inline fields">
 									<label for="issue_style">{{.i18n.Tr "repo.settings.tracker_issue_style"}}</label>

+ 1 - 1
templates/repo/settings/protected_branch.tmpl

@@ -10,7 +10,7 @@
 					{{.i18n.Tr "repo.settings.branch_protection"}}
 				</h4>
 				<div class="ui attached segment branch-protection">
-					<p>{{.i18n.Tr "repo.settings.branch_protection_desc" .Branch.Name | Str2html}}</p>
+					<p>{{.i18n.Tr "repo.settings.branch_protection_desc" .Branch.Name | Str2HTML}}</p>
 					<form class="ui form" action="{{.Link}}" method="post">
 						{{.CSRFTokenHTML}}
 						<div class="inline field">

+ 1 - 1
templates/repo/settings/webhook/dingtalk.tmpl

@@ -1,5 +1,5 @@
 {{if eq .HookType "dingtalk"}}
-	<p>{{.i18n.Tr "repo.settings.add_dingtalk_hook_desc" "https://open-doc.dingtalk.com/" | Str2html}}</p>
+	<p>{{.i18n.Tr "repo.settings.add_dingtalk_hook_desc" "https://open-doc.dingtalk.com/" | Str2HTML}}</p>
 	<form class="ui form" action="{{.BaseLink}}/settings/hooks/dingtalk/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post">
 		{{.CSRFTokenHTML}}
 		<div class="required field {{if .Err_PayloadURL}}error{{end}}">

+ 1 - 1
templates/repo/settings/webhook/discord.tmpl

@@ -1,5 +1,5 @@
 {{if eq .HookType "discord"}}
-	<p>{{.i18n.Tr "repo.settings.add_discord_hook_desc" "https://discordapp.com/" | Str2html}}</p>
+	<p>{{.i18n.Tr "repo.settings.add_discord_hook_desc" "https://discordapp.com/" | Str2HTML}}</p>
 	<form class="ui form" action="{{.BaseLink}}/settings/hooks/discord/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post">
 		{{.CSRFTokenHTML}}
 		<div class="required field {{if .Err_PayloadURL}}error{{end}}">

+ 1 - 1
templates/repo/settings/webhook/gogs.tmpl

@@ -1,5 +1,5 @@
 {{if eq .HookType "gogs"}}
-	<p>{{.i18n.Tr "repo.settings.add_webhook_desc" "https://gogs.io/docs/features/webhook.html" | Str2html}}</p>
+	<p>{{.i18n.Tr "repo.settings.add_webhook_desc" "https://gogs.io/docs/features/webhook.html" | Str2HTML}}</p>
 	<form class="ui form" action="{{.BaseLink}}/settings/hooks/gogs/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post">
 		{{.CSRFTokenHTML}}
 		<div class="required field {{if .Err_PayloadURL}}error{{end}}">

+ 1 - 1
templates/repo/settings/webhook/list.tmpl

@@ -34,7 +34,7 @@
 	<div class="ui attached table segment">
 		<div class="ui hook list">
 			<div class="item">
-				{{.Description | Str2html}}
+				{{.Description | Str2HTML}}
 			</div>
 			{{range .Webhooks}}
 				<div class="item">

+ 3 - 3
templates/repo/settings/webhook/settings.tmpl

@@ -4,19 +4,19 @@
 		<div class="field">
 			<div class="ui radio non-events checkbox">
 				<input class="hidden" name="events" type="radio" value="push_only" {{if or .PageIsSettingsHooksNew .Webhook.PushOnly}}checked{{end}}>
-				<label>{{.i18n.Tr "repo.settings.event_push_only" | Str2html}}</label>
+				<label>{{.i18n.Tr "repo.settings.event_push_only" | Str2HTML}}</label>
 			</div>
 		</div>
 		<div class="field">
 			<div class="ui radio non-events checkbox">
 				<input class="hidden" name="events" type="radio" value="send_everything" {{if .Webhook.SendEverything}}checked{{end}}>
-				<label>{{.i18n.Tr "repo.settings.event_send_everything" | Str2html}}</label>
+				<label>{{.i18n.Tr "repo.settings.event_send_everything" | Str2HTML}}</label>
 			</div>
 		</div>
 		<div class="field">
 			<div class="ui radio events checkbox">
 				<input class="hidden" name="events" type="radio" value="choose_events" {{if .Webhook.ChooseEvents}}checked{{end}}>
-				<label>{{.i18n.Tr "repo.settings.event_choose" | Str2html}}</label>
+				<label>{{.i18n.Tr "repo.settings.event_choose" | Str2HTML}}</label>
 			</div>
 		</div>
 	</div>

+ 1 - 1
templates/repo/settings/webhook/slack.tmpl

@@ -1,5 +1,5 @@
 {{if eq .HookType "slack"}}
-	<p>{{.i18n.Tr "repo.settings.add_slack_hook_desc" "https://slack.com" | Str2html}}</p>
+	<p>{{.i18n.Tr "repo.settings.add_slack_hook_desc" "https://slack.com" | Str2HTML}}</p>
 	<form class="ui form" action="{{.BaseLink}}/settings/hooks/slack/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post">
 		{{.CSRFTokenHTML}}
 		<div class="required field {{if .Err_PayloadURL}}error{{end}}">

+ 2 - 2
templates/repo/view_file.tmpl

@@ -38,7 +38,7 @@
 	<div class="ui unstackable attached table segment">
 		<div id="{{if .IsIPythonNotebook}}ipython-notebook{{end}}" class="file-view {{if .IsMarkdown}}markdown{{else if .IsIPythonNotebook}}ipython-notebook{{else if .ReadmeInList}}plain-text{{else if and .IsTextFile}}code-view{{end}} has-emoji">
 			{{if .IsMarkdown}}
-				{{if .FileContent}}{{.FileContent | Str2html}}{{end}}
+				{{if .FileContent}}{{.FileContent | Str2HTML}}{{end}}
 			{{else if .IsIPythonNotebook}}
 				<script>
 					var rendered = null;
@@ -64,7 +64,7 @@
 					});
 				</script>
 			{{else if .ReadmeInList}}
-				{{if .FileContent}}{{.FileContent | Str2html}}{{end}}
+				{{if .FileContent}}{{.FileContent | Str2HTML}}{{end}}
 			{{else if not .IsTextFile}}
 				<div class="view-raw ui center">
 					{{if .IsImageFile}}

+ 2 - 2
templates/repo/view_list.tmpl

@@ -10,7 +10,7 @@
 					<strong>{{.LatestCommit.Author.Name}}</strong>
 				{{end}}
 				<a rel="nofollow" class="ui sha label" href="{{.RepoLink}}/commit/{{.LatestCommit.ID}}" rel="nofollow">{{ShortSHA1 .LatestCommit.ID.String}}</a>
-				<span class="grey has-emoji">{{RenderCommitMessage false .LatestCommit.Summary .RepoLink $.Repository.ComposeMetas | Str2html}}</span>
+				<span class="grey has-emoji">{{RenderCommitMessage false .LatestCommit.Summary .RepoLink $.Repository.ComposeMetas | Str2HTML}}</span>
 			</th>
 			<th class="nine wide">
 			</th>
@@ -49,7 +49,7 @@
 				{{end}}
 				<td class="message collapsing has-emoji">
 					<a rel="nofollow" class="ui sha label" href="{{$.RepoLink}}/commit/{{$commit.ID}}">{{ShortSHA1 $commit.ID.String}}</a>
-					{{RenderCommitMessage false $commit.Summary $.RepoLink $.Repository.ComposeMetas | Str2html}}
+					{{RenderCommitMessage false $commit.Summary $.RepoLink $.Repository.ComposeMetas | Str2HTML}}
 				</td>
 				<td class="text grey right age">{{TimeSince $commit.Committer.When $.Lang}}</td>
 			</tr>

+ 1 - 1
templates/repo/wiki/view.tmpl

@@ -62,7 +62,7 @@
 			</div>
 		</div>
 		<div class="markdown has-emoji">
-			{{.content | Str2html}}
+			{{.content | Str2HTML}}
 		</div>
 	</div>
 </div>

+ 3 - 3
templates/user/auth/activate.tmpl

@@ -15,15 +15,15 @@
 						{{else if .ResendLimited}}
 							<p class="center">{{.i18n.Tr "auth.resent_limit_prompt"}}</p>
 						{{else}}
-							<p>{{.i18n.Tr "auth.confirmation_mail_sent_prompt" .LoggedUser.Email .Hours | Str2html}}</p>
+							<p>{{.i18n.Tr "auth.confirmation_mail_sent_prompt" .LoggedUser.Email .Hours | Str2HTML}}</p>
 						{{end}}
 					{{else}}
 						{{if .IsSendRegisterMail}}
-							<p>{{.i18n.Tr "auth.confirmation_mail_sent_prompt" .Email .Hours | Str2html}}</p>
+							<p>{{.i18n.Tr "auth.confirmation_mail_sent_prompt" .Email .Hours | Str2HTML}}</p>
 						{{else if .IsActivateFailed}}
 							<p>{{.i18n.Tr "auth.invalid_code"}}</p>
 						{{else}}
-							<p>{{.i18n.Tr "auth.has_unconfirmed_mail" .LoggedUser.Name .LoggedUser.Email | Str2html}}</p>
+							<p>{{.i18n.Tr "auth.has_unconfirmed_mail" .LoggedUser.Name .LoggedUser.Email | Str2HTML}}</p>
 							<div class="ui divider"></div>
 							<div class="text right">
 								<button class="ui blue button">{{.i18n.Tr "auth.resend_mail"}}</button>

+ 1 - 1
templates/user/auth/forgot_passwd.tmpl

@@ -10,7 +10,7 @@
 				<div class="ui attached segment">
 					{{template "base/alert" .}}
 					{{if .IsResetSent}}
-						<p>{{.i18n.Tr "auth.confirmation_mail_sent_prompt" .Email .Hours | Str2html}}</p>
+						<p>{{.i18n.Tr "auth.confirmation_mail_sent_prompt" .Email .Hours | Str2HTML}}</p>
 					{{else if .IsResetRequest}}
 						<div class="required inline field {{if .Err_Email}}error{{end}}">
 							<label for="email">{{.i18n.Tr "email"}}</label>

+ 1 - 1
templates/user/auth/login.tmpl

@@ -55,7 +55,7 @@
 					{{if .ShowRegistrationButton}}
 						<div class="inline field">
 							<label></label>
-							<a href="{{AppSubURL}}/user/sign_up">{{.i18n.Tr "auth.sign_up_now" | Str2html}}</a>
+							<a href="{{AppSubURL}}/user/sign_up">{{.i18n.Tr "auth.sign_up_now" | Str2HTML}}</a>
 						</div>
 					{{end}}
 				</div>

+ 20 - 20
templates/user/dashboard/feeds.tmpl

@@ -10,56 +10,56 @@
 						<a href="{{AppSubURL}}/{{.GetActUserName}}">{{.ShortActUserName}}</a>
 						<!-- Reference types to models/action.go -->
 						{{if eq .GetOpType 1}} 
-							{{$.i18n.Tr "action.create_repo" .GetRepoLink .ShortRepoPath | Str2html}}
+							{{$.i18n.Tr "action.create_repo" .GetRepoLink .ShortRepoPath | Str2HTML}}
 						{{else if eq .GetOpType 2}}
-							{{$.i18n.Tr "action.rename_repo" .GetContent .GetRepoLink .ShortRepoPath | Str2html}}
+							{{$.i18n.Tr "action.rename_repo" .GetContent .GetRepoLink .ShortRepoPath | Str2HTML}}
 						{{else if eq .GetOpType 5}}
 							{{ $branchLink := .GetBranch | EscapePound}}
-							{{$.i18n.Tr "action.commit_repo" .GetRepoLink $branchLink .GetBranch .ShortRepoPath | Str2html}}
+							{{$.i18n.Tr "action.commit_repo" .GetRepoLink $branchLink .GetBranch .ShortRepoPath | Str2HTML}}
 						{{else if eq .GetOpType 6}}
 							{{ $index := index .GetIssueInfos 0}}
-							{{$.i18n.Tr "action.create_issue" .GetRepoLink $index .ShortRepoPath | Str2html}}
+							{{$.i18n.Tr "action.create_issue" .GetRepoLink $index .ShortRepoPath | Str2HTML}}
 						{{else if eq .GetOpType 7}}
 							{{ $index := index .GetIssueInfos 0}}
-							{{$.i18n.Tr "action.create_pull_request" .GetRepoLink $index .ShortRepoPath | Str2html}}
+							{{$.i18n.Tr "action.create_pull_request" .GetRepoLink $index .ShortRepoPath | Str2HTML}}
 						{{else if eq .GetOpType 8}}
-							{{$.i18n.Tr "action.transfer_repo" .GetContent .GetRepoLink .ShortRepoPath | Str2html}}
+							{{$.i18n.Tr "action.transfer_repo" .GetContent .GetRepoLink .ShortRepoPath | Str2HTML}}
 						{{else if eq .GetOpType 9}}
-							{{$.i18n.Tr "action.push_tag" .GetRepoLink .GetBranch .ShortRepoPath | Str2html}}
+							{{$.i18n.Tr "action.push_tag" .GetRepoLink .GetBranch .ShortRepoPath | Str2HTML}}
 						{{else if eq .GetOpType 10}}
 							{{ $index := index .GetIssueInfos 0}}
-							{{$.i18n.Tr "action.comment_issue" .GetRepoLink $index .ShortRepoPath | Str2html}}
+							{{$.i18n.Tr "action.comment_issue" .GetRepoLink $index .ShortRepoPath | Str2HTML}}
 						{{else if eq .GetOpType 11}}
 							{{ $index := index .GetIssueInfos 0}}
-							{{$.i18n.Tr "action.merge_pull_request" .GetRepoLink $index .ShortRepoPath | Str2html}}
+							{{$.i18n.Tr "action.merge_pull_request" .GetRepoLink $index .ShortRepoPath | Str2HTML}}
 						{{else if eq .GetOpType 12}}
 							{{ $index := index .GetIssueInfos 0}}
-							{{$.i18n.Tr "action.close_issue" .GetRepoLink $index .ShortRepoPath | Str2html}}
+							{{$.i18n.Tr "action.close_issue" .GetRepoLink $index .ShortRepoPath | Str2HTML}}
 						{{else if eq .GetOpType 13}}
 							{{ $index := index .GetIssueInfos 0}}
-							{{$.i18n.Tr "action.reopen_issue" .GetRepoLink $index .ShortRepoPath | Str2html}}
+							{{$.i18n.Tr "action.reopen_issue" .GetRepoLink $index .ShortRepoPath | Str2HTML}}
 						{{else if eq .GetOpType 14}}
 							{{ $index := index .GetIssueInfos 0}}
-							{{$.i18n.Tr "action.close_pull_request" .GetRepoLink $index .ShortRepoPath | Str2html}}
+							{{$.i18n.Tr "action.close_pull_request" .GetRepoLink $index .ShortRepoPath | Str2HTML}}
 						{{else if eq .GetOpType 15}}
 							{{ $index := index .GetIssueInfos 0}}
-							{{$.i18n.Tr "action.reopen_pull_request" .GetRepoLink $index .ShortRepoPath | Str2html}}
+							{{$.i18n.Tr "action.reopen_pull_request" .GetRepoLink $index .ShortRepoPath | Str2HTML}}
 						{{else if eq .GetOpType 16}}
 							{{ $branchLink := .GetBranch | EscapePound}}
-							{{$.i18n.Tr "action.create_branch" .GetRepoLink $branchLink .GetBranch .ShortRepoPath | Str2html}}
+							{{$.i18n.Tr "action.create_branch" .GetRepoLink $branchLink .GetBranch .ShortRepoPath | Str2HTML}}
 						{{else if eq .GetOpType 17}}
-							{{$.i18n.Tr "action.delete_branch" .GetRepoLink .GetBranch .ShortRepoPath | Str2html}}
+							{{$.i18n.Tr "action.delete_branch" .GetRepoLink .GetBranch .ShortRepoPath | Str2HTML}}
 						{{else if eq .GetOpType 18}}
-							{{$.i18n.Tr "action.delete_tag" .GetRepoLink .GetBranch .ShortRepoPath | Str2html}}
+							{{$.i18n.Tr "action.delete_tag" .GetRepoLink .GetBranch .ShortRepoPath | Str2HTML}}
 						{{else if eq .GetOpType 19}}
-							{{$.i18n.Tr "action.fork_repo" .GetRepoLink .ShortRepoPath | Str2html}}
+							{{$.i18n.Tr "action.fork_repo" .GetRepoLink .ShortRepoPath | Str2HTML}}
 						{{else if eq .GetOpType 20}}
 							{{ $branchLink := .GetBranch | EscapePound}}
-							{{$.i18n.Tr "action.mirror_sync_push" .GetRepoLink $branchLink .GetBranch .ShortRepoPath | Str2html}}
+							{{$.i18n.Tr "action.mirror_sync_push" .GetRepoLink $branchLink .GetBranch .ShortRepoPath | Str2HTML}}
 						{{else if eq .GetOpType 21}}
-							{{$.i18n.Tr "action.mirror_sync_create" .GetRepoLink .GetBranch .ShortRepoPath | Str2html}}
+							{{$.i18n.Tr "action.mirror_sync_create" .GetRepoLink .GetBranch .ShortRepoPath | Str2HTML}}
 						{{else if eq .GetOpType 22}}
-							{{$.i18n.Tr "action.mirror_sync_delete" .GetRepoLink .GetBranch .ShortRepoPath | Str2html}}
+							{{$.i18n.Tr "action.mirror_sync_delete" .GetRepoLink .GetBranch .ShortRepoPath | Str2HTML}}
 						{{end}}
 					</p>
 					{{if or (eq .GetOpType 5) (eq .GetOpType 20)}}

+ 1 - 1
templates/user/settings/delete.tmpl

@@ -10,7 +10,7 @@
 				</h4>
 				<div class="ui attached warning segment">
 					<div class="ui red message">
-						<p class="text left"><i class="octicon octicon-alert"></i> {{.i18n.Tr "settings.delete_prompt" | Str2html}}</p>
+						<p class="text left"><i class="octicon octicon-alert"></i> {{.i18n.Tr "settings.delete_prompt" | Str2HTML}}</p>
 					</div>
 					<form class="ui form" id="delete-form" action="{{.Link}}" method="post">
 						{{.CSRFTokenHTML}}

+ 1 - 1
templates/user/settings/sshkeys.tmpl

@@ -43,7 +43,7 @@
 					</div>
 				</div>
 				<br>
-				<p>{{.i18n.Tr "settings.ssh_helper" "https://help.github.com/articles/generating-ssh-keys" "https://help.github.com/ssh-issues/" | Str2html}}</p>
+				<p>{{.i18n.Tr "settings.ssh_helper" "https://help.github.com/articles/generating-ssh-keys" "https://help.github.com/ssh-issues/" | Str2HTML}}</p>
 				<div {{if not .HasError}}class="hide"{{end}} id="add-ssh-key-panel">
 					<h4 class="ui top attached header">
 						{{.i18n.Tr "settings.add_new_key"}}