diff options
Diffstat (limited to 'templates')
57 files changed, 117 insertions, 117 deletions
diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl index 8088315f17..cc7d338589 100644 --- a/templates/admin/dashboard.tmpl +++ b/templates/admin/dashboard.tmpl @@ -2,7 +2,7 @@ <div class="admin-setting-content"> {{if .NeedUpdate}} <div class="ui negative message flash-error"> - <p>{{(ctx.Locale.Tr "admin.dashboard.new_version_hint" .RemoteVersion AppVer) | Str2html}}</p> + <p>{{ctx.Locale.Tr "admin.dashboard.new_version_hint" .RemoteVersion AppVer}}</p> </div> {{end}} <h4 class="ui top attached header"> diff --git a/templates/code/searchcombo.tmpl b/templates/code/searchcombo.tmpl index 48dc13b47b..d256890918 100644 --- a/templates/code/searchcombo.tmpl +++ b/templates/code/searchcombo.tmpl @@ -7,7 +7,7 @@ </div> {{else if .SearchResults}} <h3> - {{ctx.Locale.Tr "explore.code_search_results" (.Keyword|Escape) | Str2html}} + {{ctx.Locale.Tr "explore.code_search_results" (.Keyword|Escape)}} </h3> {{template "code/searchresults" .}} {{else if .Keyword}} diff --git a/templates/home.tmpl b/templates/home.tmpl index 78364431e9..1e5369e7ee 100644 --- a/templates/home.tmpl +++ b/templates/home.tmpl @@ -17,7 +17,7 @@ {{svg "octicon-flame"}} {{ctx.Locale.Tr "startpage.install"}} </h1> <p class="large"> - {{ctx.Locale.Tr "startpage.install_desc" | Str2html}} + {{ctx.Locale.Tr "startpage.install_desc"}} </p> </div> <div class="eight wide center column"> @@ -25,7 +25,7 @@ {{svg "octicon-device-desktop"}} {{ctx.Locale.Tr "startpage.platform"}} </h1> <p class="large"> - {{ctx.Locale.Tr "startpage.platform_desc" | Str2html}} + {{ctx.Locale.Tr "startpage.platform_desc"}} </p> </div> </div> @@ -35,7 +35,7 @@ {{svg "octicon-rocket"}} {{ctx.Locale.Tr "startpage.lightweight"}} </h1> <p class="large"> - {{ctx.Locale.Tr "startpage.lightweight_desc" | Str2html}} + {{ctx.Locale.Tr "startpage.lightweight_desc"}} </p> </div> <div class="eight wide center column"> @@ -43,7 +43,7 @@ {{svg "octicon-code"}} {{ctx.Locale.Tr "startpage.license"}} </h1> <p class="large"> - {{ctx.Locale.Tr "startpage.license_desc" | Str2html}} + {{ctx.Locale.Tr "startpage.license_desc"}} </p> </div> </div> diff --git a/templates/mail/auth/activate.tmpl b/templates/mail/auth/activate.tmpl index a15afe3d49..b1bb4cb463 100644 --- a/templates/mail/auth/activate.tmpl +++ b/templates/mail/auth/activate.tmpl @@ -8,8 +8,8 @@ {{$activate_url := printf "%suser/activate?code=%s" AppUrl (QueryEscape .Code)}} <body> - <p>{{.locale.Tr "mail.activate_account.text_1" (.DisplayName|DotEscape) AppName | Str2html}}</p><br> - <p>{{.locale.Tr "mail.activate_account.text_2" .ActiveCodeLives | Str2html}}</p><p><a href="{{$activate_url}}">{{$activate_url}}</a></p><br> + <p>{{.locale.Tr "mail.activate_account.text_1" (.DisplayName|DotEscape) AppName}}</p><br> + <p>{{.locale.Tr "mail.activate_account.text_2" .ActiveCodeLives}}</p><p><a href="{{$activate_url}}">{{$activate_url}}</a></p><br> <p>{{.locale.Tr "mail.link_not_working_do_paste"}}</p> <p>© <a target="_blank" rel="noopener noreferrer" href="{{AppUrl}}">{{AppName}}</a></p> diff --git a/templates/mail/auth/activate_email.tmpl b/templates/mail/auth/activate_email.tmpl index b15cc2a68a..3d32f80a4e 100644 --- a/templates/mail/auth/activate_email.tmpl +++ b/templates/mail/auth/activate_email.tmpl @@ -8,8 +8,8 @@ {{$activate_url := printf "%suser/activate_email?code=%s&email=%s" AppUrl (QueryEscape .Code) (QueryEscape .Email)}} <body> - <p>{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape) | Str2html}}</p><br> - <p>{{.locale.Tr "mail.activate_email.text" .ActiveCodeLives | Str2html}}</p><p><a href="{{$activate_url}}">{{$activate_url}}</a></p><br> + <p>{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}</p><br> + <p>{{.locale.Tr "mail.activate_email.text" .ActiveCodeLives}}</p><p><a href="{{$activate_url}}">{{$activate_url}}</a></p><br> <p>{{.locale.Tr "mail.link_not_working_do_paste"}}</p> <p>© <a target="_blank" rel="noopener noreferrer" href="{{AppUrl}}">{{AppName}}</a></p> diff --git a/templates/mail/auth/register_notify.tmpl b/templates/mail/auth/register_notify.tmpl index 3cdb456fb3..ec3e09dd5f 100644 --- a/templates/mail/auth/register_notify.tmpl +++ b/templates/mail/auth/register_notify.tmpl @@ -8,10 +8,10 @@ {{$set_pwd_url := printf "%[1]suser/forgot_password" AppUrl}} <body> - <p>{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape) | Str2html}}</p><br> + <p>{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}</p><br> <p>{{.locale.Tr "mail.register_notify.text_1" AppName}}</p><br> <p>{{.locale.Tr "mail.register_notify.text_2" .Username}}</p><p><a href="{{AppUrl}}user/login">{{AppUrl}}user/login</a></p><br> - <p>{{.locale.Tr "mail.register_notify.text_3" ($set_pwd_url | Escape) | Str2html}}</p><br> + <p>{{.locale.Tr "mail.register_notify.text_3" ($set_pwd_url | Escape)}}</p><br> <p>© <a target="_blank" rel="noopener noreferrer" href="{{AppUrl}}">{{AppName}}</a></p> </body> diff --git a/templates/mail/auth/reset_passwd.tmpl b/templates/mail/auth/reset_passwd.tmpl index 172844c954..55b1ecec3f 100644 --- a/templates/mail/auth/reset_passwd.tmpl +++ b/templates/mail/auth/reset_passwd.tmpl @@ -8,8 +8,8 @@ {{$recover_url := printf "%suser/recover_account?code=%s" AppUrl (QueryEscape .Code)}} <body> - <p>{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape) | Str2html}}</p><br> - <p>{{.locale.Tr "mail.reset_password.text" .ResetPwdCodeLives | Str2html}}</p><p><a href="{{$recover_url}}">{{$recover_url}}</a></p><br> + <p>{{.locale.Tr "mail.hi_user_x" (.DisplayName|DotEscape)}}</p><br> + <p>{{.locale.Tr "mail.reset_password.text" .ResetPwdCodeLives}}</p><p><a href="{{$recover_url}}">{{$recover_url}}</a></p><br> <p>{{.locale.Tr "mail.link_not_working_do_paste"}}</p> <p>© <a target="_blank" rel="noopener noreferrer" href="{{AppUrl}}">{{AppName}}</a></p> diff --git a/templates/mail/issue/default.tmpl b/templates/mail/issue/default.tmpl index b5a7ab95cf..54ae726d71 100644 --- a/templates/mail/issue/default.tmpl +++ b/templates/mail/issue/default.tmpl @@ -16,7 +16,7 @@ </head> <body> - {{if .IsMention}}<p>{{.locale.Tr "mail.issue.x_mentioned_you" .Doer.Name | Str2html}}</p>{{end}} + {{if .IsMention}}<p>{{.locale.Tr "mail.issue.x_mentioned_you" .Doer.Name}}</p>{{end}} {{if eq .ActionName "push"}} <p> {{if .Comment.IsForcePush}} @@ -30,32 +30,32 @@ {{.locale.Tr "mail.issue.action.force_push" .Doer.Name .Comment.Issue.PullRequest.HeadBranch ($oldCommitLink|Safe) ($newCommitLink|Safe)}} {{else}} - {{.locale.TrN (len .Comment.Commits) "mail.issue.action.push_1" "mail.issue.action.push_n" .Doer.Name .Comment.Issue.PullRequest.HeadBranch (len .Comment.Commits) | Str2html}} + {{.locale.TrN (len .Comment.Commits) "mail.issue.action.push_1" "mail.issue.action.push_n" .Doer.Name .Comment.Issue.PullRequest.HeadBranch (len .Comment.Commits)}} {{end}} </p> {{end}} <p> {{if eq .ActionName "close"}} - {{.locale.Tr "mail.issue.action.close" (Escape .Doer.Name) .Issue.Index | Str2html}} + {{.locale.Tr "mail.issue.action.close" (Escape .Doer.Name) .Issue.Index}} {{else if eq .ActionName "reopen"}} - {{.locale.Tr "mail.issue.action.reopen" (Escape .Doer.Name) .Issue.Index | Str2html}} + {{.locale.Tr "mail.issue.action.reopen" (Escape .Doer.Name) .Issue.Index}} {{else if eq .ActionName "merge"}} - {{.locale.Tr "mail.issue.action.merge" (Escape .Doer.Name) .Issue.Index (Escape .Issue.PullRequest.BaseBranch) | Str2html}} + {{.locale.Tr "mail.issue.action.merge" (Escape .Doer.Name) .Issue.Index (Escape .Issue.PullRequest.BaseBranch)}} {{else if eq .ActionName "approve"}} - {{.locale.Tr "mail.issue.action.approve" (Escape .Doer.Name) | Str2html}} + {{.locale.Tr "mail.issue.action.approve" (Escape .Doer.Name)}} {{else if eq .ActionName "reject"}} - {{.locale.Tr "mail.issue.action.reject" (Escape .Doer.Name) | Str2html}} + {{.locale.Tr "mail.issue.action.reject" (Escape .Doer.Name)}} {{else if eq .ActionName "review"}} - {{.locale.Tr "mail.issue.action.review" (Escape .Doer.Name) | Str2html}} + {{.locale.Tr "mail.issue.action.review" (Escape .Doer.Name)}} {{else if eq .ActionName "review_dismissed"}} - {{.locale.Tr "mail.issue.action.review_dismissed" (Escape .Doer.Name) (Escape .Comment.Review.Reviewer.Name) | Str2html}} + {{.locale.Tr "mail.issue.action.review_dismissed" (Escape .Doer.Name) (Escape .Comment.Review.Reviewer.Name)}} {{else if eq .ActionName "ready_for_review"}} - {{.locale.Tr "mail.issue.action.ready_for_review" (Escape .Doer.Name) | Str2html}} + {{.locale.Tr "mail.issue.action.ready_for_review" (Escape .Doer.Name)}} {{end}} {{- if eq .Body ""}} {{if eq .ActionName "new"}} - {{.locale.Tr "mail.issue.action.new" (Escape .Doer.Name) .Issue.Index | Str2html}} + {{.locale.Tr "mail.issue.action.new" (Escape .Doer.Name) .Issue.Index}} {{end}} {{else}} {{.Body | Str2html}} diff --git a/templates/mail/team_invite.tmpl b/templates/mail/team_invite.tmpl index d21b7843ec..cb0c0c0a50 100644 --- a/templates/mail/team_invite.tmpl +++ b/templates/mail/team_invite.tmpl @@ -5,7 +5,7 @@ <meta name="format-detection" content="telephone=no,date=no,address=no,email=no,url=no"> </head> <body> - <p>{{.locale.Tr "mail.team_invite.text_1" (DotEscape .Inviter.DisplayName) (DotEscape .Team.Name) (DotEscape .Organization.DisplayName) | Str2html}}</p> + <p>{{.locale.Tr "mail.team_invite.text_1" (DotEscape .Inviter.DisplayName) (DotEscape .Team.Name) (DotEscape .Organization.DisplayName)}}</p> <p>{{.locale.Tr "mail.team_invite.text_2"}}</p><p><a href="{{.InviteURL}}">{{.InviteURL}}</a></p> <p>{{.locale.Tr "mail.link_not_working_do_paste"}}</p> <p>{{.locale.Tr "mail.team_invite.text_3" .Invite.Email}}</p> diff --git a/templates/org/settings/delete.tmpl b/templates/org/settings/delete.tmpl index 2cf8238f57..e1ef471e34 100644 --- a/templates/org/settings/delete.tmpl +++ b/templates/org/settings/delete.tmpl @@ -6,7 +6,7 @@ </h4> <div class="ui attached error segment"> <div class="ui red message"> - <p class="text left">{{svg "octicon-alert"}} {{ctx.Locale.Tr "org.settings.delete_prompt" | Str2html}}</p> + <p class="text left">{{svg "octicon-alert"}} {{ctx.Locale.Tr "org.settings.delete_prompt"}}</p> </div> <form class="ui form ignore-dirty" id="delete-form" action="{{.Link}}" method="post"> {{.CsrfTokenHtml}} diff --git a/templates/org/settings/labels.tmpl b/templates/org/settings/labels.tmpl index b12ea8d9f4..8eb7b4584e 100644 --- a/templates/org/settings/labels.tmpl +++ b/templates/org/settings/labels.tmpl @@ -2,7 +2,7 @@ <div class="org-setting-content"> <div class="gt-df gt-ac"> <div class="gt-f1"> - {{ctx.Locale.Tr "org.settings.labels_desc" | Str2html}} + {{ctx.Locale.Tr "org.settings.labels_desc"}} </div> <button class="ui small primary new-label button">{{ctx.Locale.Tr "repo.issues.new_label"}}</button> </div> diff --git a/templates/org/team/invite.tmpl b/templates/org/team/invite.tmpl index e003d14757..1167828d14 100644 --- a/templates/org/team/invite.tmpl +++ b/templates/org/team/invite.tmpl @@ -7,7 +7,7 @@ {{ctx.AvatarUtils.Avatar .Organization 140}} </div> <div class="content"> - <div class="header">{{ctx.Locale.Tr "org.teams.invite.title" .Team.Name .Organization.Name | Str2html}}</div> + <div class="header">{{ctx.Locale.Tr "org.teams.invite.title" .Team.Name .Organization.Name}}</div> <div class="meta">{{ctx.Locale.Tr "org.teams.invite.by" .Inviter.Name}}</div> <div class="description">{{ctx.Locale.Tr "org.teams.invite.description"}}</div> </div> diff --git a/templates/org/team/new.tmpl b/templates/org/team/new.tmpl index 0178a20fbb..50ef53b91b 100644 --- a/templates/org/team/new.tmpl +++ b/templates/org/team/new.tmpl @@ -32,14 +32,14 @@ <div class="ui radio checkbox"> <input type="radio" name="repo_access" value="specific" {{if not .Team.IncludesAllRepositories}}checked{{end}}> <label>{{ctx.Locale.Tr "org.teams.specific_repositories"}}</label> - <span class="help">{{ctx.Locale.Tr "org.teams.specific_repositories_helper" | Str2html}}</span> + <span class="help">{{ctx.Locale.Tr "org.teams.specific_repositories_helper"}}</span> </div> </div> <div class="field"> <div class="ui radio checkbox"> <input type="radio" name="repo_access" value="all" {{if .Team.IncludesAllRepositories}}checked{{end}}> <label>{{ctx.Locale.Tr "org.teams.all_repositories"}}</label> - <span class="help">{{ctx.Locale.Tr "org.teams.all_repositories_helper" | Str2html}}</span> + <span class="help">{{ctx.Locale.Tr "org.teams.all_repositories_helper"}}</span> </div> </div> diff --git a/templates/org/team/sidebar.tmpl b/templates/org/team/sidebar.tmpl index 37550ab71f..440fa11dc9 100644 --- a/templates/org/team/sidebar.tmpl +++ b/templates/org/team/sidebar.tmpl @@ -27,16 +27,16 @@ </div> {{if eq .Team.LowerName "owners"}} <div class="item"> - {{ctx.Locale.Tr "org.teams.owners_permission_desc" | Str2html}} + {{ctx.Locale.Tr "org.teams.owners_permission_desc"}} </div> {{else}} <div class="item"> <h3>{{ctx.Locale.Tr "org.team_access_desc"}}</h3> <ul> {{if .Team.IncludesAllRepositories}} - <li>{{ctx.Locale.Tr "org.teams.all_repositories" | Str2html}}</li> + <li>{{ctx.Locale.Tr "org.teams.all_repositories"}}</li> {{else}} - <li>{{ctx.Locale.Tr "org.teams.specific_repositories" | Str2html}}</li> + <li>{{ctx.Locale.Tr "org.teams.specific_repositories"}}</li> {{end}} {{if .Team.CanCreateOrgRepo}} <li>{{ctx.Locale.Tr "org.teams.can_create_org_repo"}}</li> @@ -44,10 +44,10 @@ </ul> {{if (eq .Team.AccessMode 2)}} <h3>{{ctx.Locale.Tr "org.settings.permission"}}</h3> - {{ctx.Locale.Tr "org.teams.write_permission_desc" | Str2html}} + {{ctx.Locale.Tr "org.teams.write_permission_desc"}} {{else if (eq .Team.AccessMode 3)}} <h3>{{ctx.Locale.Tr "org.settings.permission"}}</h3> - {{ctx.Locale.Tr "org.teams.admin_permission_desc" | Str2html}} + {{ctx.Locale.Tr "org.teams.admin_permission_desc"}} {{else}} <table class="ui table"> <thead> diff --git a/templates/repo/blame.tmpl b/templates/repo/blame.tmpl index 31cd5b23f6..4df7b18c44 100644 --- a/templates/repo/blame.tmpl +++ b/templates/repo/blame.tmpl @@ -2,11 +2,11 @@ {{$revsFileLink := URLJoin .RepoLink "src" .BranchNameSubURL "/.git-blame-ignore-revs"}} {{if .UsesIgnoreRevs}} <div class="ui info message"> - <p>{{ctx.Locale.Tr "repo.blame.ignore_revs" $revsFileLink (print $revsFileLink "?bypass-blame-ignore=true") | Str2html}}</p> + <p>{{ctx.Locale.Tr "repo.blame.ignore_revs" $revsFileLink (print $revsFileLink "?bypass-blame-ignore=true")}}</p> </div> {{else}} <div class="ui error message"> - <p>{{ctx.Locale.Tr "repo.blame.ignore_revs.failed" $revsFileLink | Str2html}}</p> + <p>{{ctx.Locale.Tr "repo.blame.ignore_revs.failed" $revsFileLink}}</p> </div> {{end}} {{end}} diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl index 8ae7301c4a..46503cb5df 100644 --- a/templates/repo/branch/list.tmpl +++ b/templates/repo/branch/list.tmpl @@ -210,7 +210,7 @@ {{ctx.Locale.Tr "repo.branch.delete_html"}} <span class="name"></span> </div> <div class="content"> - <p>{{ctx.Locale.Tr "repo.branch.delete_desc" | Str2html}}</p> + <p>{{ctx.Locale.Tr "repo.branch.delete_desc"}}</p> </div> {{template "base/modal_actions_confirm" .}} </div> diff --git a/templates/repo/create.tmpl b/templates/repo/create.tmpl index d6ff22b7ab..73c9ca6a1f 100644 --- a/templates/repo/create.tmpl +++ b/templates/repo/create.tmpl @@ -158,7 +158,7 @@ {{end}} </div> </div> - <span class="help">{{ctx.Locale.Tr "repo.license_helper_desc" "https://choosealicense.com/" | Str2html}}</span> + <span class="help">{{ctx.Locale.Tr "repo.license_helper_desc" "https://choosealicense.com/"}}</span> </div> <div class="inline field"> diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index 5960decc06..abeeacead0 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -19,7 +19,7 @@ {{end}} {{if not .DiffNotAvailable}} <div class="diff-detail-stats gt-df gt-ac gt-fw"> - {{svg "octicon-diff" 16 "gt-mr-2"}}{{ctx.Locale.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}} + {{svg "octicon-diff" 16 "gt-mr-2"}}{{ctx.Locale.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion}} </div> {{end}} </div> diff --git a/templates/repo/diff/stats.tmpl b/templates/repo/diff/stats.tmpl index db468ab6c8..b7acb3d49b 100644 --- a/templates/repo/diff/stats.tmpl +++ b/templates/repo/diff/stats.tmpl @@ -1,5 +1,5 @@ {{Eval .file.Addition "+" .file.Deletion}} -<span class="diff-stats-bar gt-mx-3" data-tooltip-content="{{ctx.Locale.Tr "repo.diff.stats_desc_file" (Eval .file.Addition "+" .file.Deletion) .file.Addition .file.Deletion | Str2html}}"> +<span class="diff-stats-bar gt-mx-3" data-tooltip-content="{{ctx.Locale.Tr "repo.diff.stats_desc_file" (Eval .file.Addition "+" .file.Deletion) .file.Addition .file.Deletion}}"> {{/* if the denominator is zero, then the float result is "width: NaNpx", as before, it just works */}} <div class="diff-stats-add-bar" style="width: {{Eval 100 "*" .file.Addition "/" "(" .file.Addition "+" .file.Deletion "+" 0.0 ")"}}%"></div> </span> diff --git a/templates/repo/empty.tmpl b/templates/repo/empty.tmpl index 62194abe50..f171cd8d5c 100644 --- a/templates/repo/empty.tmpl +++ b/templates/repo/empty.tmpl @@ -24,7 +24,7 @@ </h4> <div class="ui attached guide table segment empty-repo-guide"> <div class="item"> - <h3>{{ctx.Locale.Tr "repo.clone_this_repo"}} <small>{{ctx.Locale.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository" | Str2html}}</small></h3> + <h3>{{ctx.Locale.Tr "repo.clone_this_repo"}} <small>{{ctx.Locale.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository"}}</small></h3> <div class="repo-button-row"> {{if and .CanWriteCode (not .Repository.IsArchived)}} diff --git a/templates/repo/issue/labels/label_list.tmpl b/templates/repo/issue/labels/label_list.tmpl index 9a6065a407..9b0061b60e 100644 --- a/templates/repo/issue/labels/label_list.tmpl +++ b/templates/repo/issue/labels/label_list.tmpl @@ -61,7 +61,7 @@ <li class="item"> <div class="ui grid middle aligned"> <div class="ten wide column"> - {{ctx.Locale.Tr "repo.org_labels_desc" | Str2html}} + {{ctx.Locale.Tr "repo.org_labels_desc"}} {{if .IsOrganizationOwner}} <a href="{{.OrganizationLink}}/settings/labels">({{ctx.Locale.Tr "repo.org_labels_desc_manage"}})</a>: {{end}} diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index 793772ecd0..906f880140 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -181,7 +181,7 @@ {{ctx.Locale.Tr "repo.branch.delete" .HeadTarget}} </div> <div class="content"> - <p>{{ctx.Locale.Tr "repo.branch.delete_desc" | Str2html}}</p> + <p>{{ctx.Locale.Tr "repo.branch.delete_desc"}}</p> </div> {{template "base/modal_actions_confirm" .}} </div> diff --git a/templates/repo/migrate/options.tmpl b/templates/repo/migrate/options.tmpl index 1bc30b886d..1cf8600749 100644 --- a/templates/repo/migrate/options.tmpl +++ b/templates/repo/migrate/options.tmpl @@ -17,7 +17,7 @@ <span id="lfs_settings" class="gt-hidden">(<a id="lfs_settings_show" href="#">{{ctx.Locale.Tr "repo.settings.advanced_settings"}}</a>)</span> </div> <div id="lfs_endpoint" class="gt-hidden"> - <span class="help">{{ctx.Locale.Tr "repo.migrate_options_lfs_endpoint.description" "https://github.com/git-lfs/git-lfs/blob/main/docs/api/server-discovery.md#server-discovery" | Str2html}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate_options_lfs_endpoint.description.local"}}{{end}}</span> + <span class="help">{{ctx.Locale.Tr "repo.migrate_options_lfs_endpoint.description" "https://github.com/git-lfs/git-lfs/blob/main/docs/api/server-discovery.md#server-discovery"}}{{if .ContextUser.CanImportLocal}} {{ctx.Locale.Tr "repo.migrate_options_lfs_endpoint.description.local"}}{{end}}</span> <div class="inline field {{if .Err_LFSEndpoint}}error{{end}}"> <label>{{ctx.Locale.Tr "repo.migrate_options_lfs_endpoint.label"}}</label> <input name="lfs_endpoint" value="{{.lfs_endpoint}}" placeholder="{{ctx.Locale.Tr "repo.migrate_options_lfs_endpoint.placeholder"}}"> diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl index 6dbeb741db..5b747c2bf9 100644 --- a/templates/repo/release/list.tmpl +++ b/templates/repo/release/list.tmpl @@ -54,7 +54,7 @@ <span class="time">{{TimeSinceUnix $release.CreatedUnix ctx.Locale}}</span> {{end}} {{if and (not $release.IsDraft) ($.Permission.CanRead $.UnitTypeCode)}} - | <span class="ahead"><a href="{{$.RepoLink}}/compare/{{$release.TagName | PathEscapeSegments}}...{{$release.TargetBehind | PathEscapeSegments}}">{{ctx.Locale.Tr "repo.release.ahead.commits" $release.NumCommitsBehind | Str2html}}</a> {{ctx.Locale.Tr "repo.release.ahead.target" $release.TargetBehind}}</span> + | <span class="ahead"><a href="{{$.RepoLink}}/compare/{{$release.TagName | PathEscapeSegments}}...{{$release.TargetBehind | PathEscapeSegments}}">{{ctx.Locale.Tr "repo.release.ahead.commits" $release.NumCommitsBehind}}</a> {{ctx.Locale.Tr "repo.release.ahead.target" $release.TargetBehind}}</span> {{end}} </p> <div class="markup desc"> diff --git a/templates/repo/search.tmpl b/templates/repo/search.tmpl index b616b4de32..495620300f 100644 --- a/templates/repo/search.tmpl +++ b/templates/repo/search.tmpl @@ -24,7 +24,7 @@ </div> {{else if .Keyword}} <h3> - {{ctx.Locale.Tr "repo.search.results" (.Keyword|Escape) (.RepoLink|Escape) (.RepoName|Escape) | Str2html}} + {{ctx.Locale.Tr "repo.search.results" (.Keyword|Escape) (.RepoLink|Escape) (.RepoName|Escape)}} </h3> {{if .SearchResults}} <div class="flex-text-block gt-fw"> diff --git a/templates/repo/settings/deploy_keys.tmpl b/templates/repo/settings/deploy_keys.tmpl index 3ea854ef88..a79a196825 100644 --- a/templates/repo/settings/deploy_keys.tmpl +++ b/templates/repo/settings/deploy_keys.tmpl @@ -31,7 +31,7 @@ <label for="is_writable"> {{ctx.Locale.Tr "repo.settings.is_writable"}} </label> - <small style="padding-left: 26px;">{{ctx.Locale.Tr "repo.settings.is_writable_info" | Str2html}}</small> + <small style="padding-left: 26px;">{{ctx.Locale.Tr "repo.settings.is_writable_info"}}</small> </div> </div> <button class="ui primary button"> diff --git a/templates/repo/settings/githooks.tmpl b/templates/repo/settings/githooks.tmpl index 389d381f30..bdbfb40ca1 100644 --- a/templates/repo/settings/githooks.tmpl +++ b/templates/repo/settings/githooks.tmpl @@ -6,7 +6,7 @@ <div class="ui attached segment"> <div class="ui list"> <div class="item"> - {{ctx.Locale.Tr "repo.settings.githooks_desc" | Str2html}} + {{ctx.Locale.Tr "repo.settings.githooks_desc"}} </div> {{range .Hooks}} <div class="item truncated-item-container"> diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index 7122778f06..6d01b227ff 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -191,7 +191,7 @@ <div class="field {{if .Err_LFSEndpoint}}error{{end}}"> <label for="mirror_lfs_endpoint">{{ctx.Locale.Tr "repo.mirror_lfs_endpoint"}}</label> <input id="mirror_lfs_endpoint" name="mirror_lfs_endpoint" value="{{.PullMirror.LFSEndpoint}}" placeholder="{{ctx.Locale.Tr "repo.migrate_options_lfs_endpoint.placeholder"}}"> - <p class="help">{{ctx.Locale.Tr "repo.mirror_lfs_endpoint_desc" "https://github.com/git-lfs/git-lfs/blob/main/docs/api/server-discovery.md#server-discovery" | Str2html}}</p> + <p class="help">{{ctx.Locale.Tr "repo.mirror_lfs_endpoint_desc" "https://github.com/git-lfs/git-lfs/blob/main/docs/api/server-discovery.md#server-discovery"}}</p> </div> {{end}} <div class="field"> @@ -409,7 +409,7 @@ <div class="field"> <label for="tracker_url_format">{{ctx.Locale.Tr "repo.settings.tracker_url_format"}}</label> <input id="tracker_url_format" name="tracker_url_format" type="url" value="{{(.Repository.MustGetUnit $.Context $.UnitTypeExternalTracker).ExternalTrackerConfig.ExternalTrackerFormat}}" placeholder="https://github.com/{user}/{repo}/issues/{index}"> - <p class="help">{{ctx.Locale.Tr "repo.settings.tracker_url_format_desc" | Str2html}}</p> + <p class="help">{{ctx.Locale.Tr "repo.settings.tracker_url_format_desc"}}</p> </div> <div class="inline fields"> <label for="issue_style">{{ctx.Locale.Tr "repo.settings.tracker_issue_style"}}</label> @@ -437,7 +437,7 @@ <div class="field {{if ne $externalTrackerStyle "regexp"}}disabled{{end}}" id="tracker-issue-style-regex-box"> <label for="external_tracker_regexp_pattern">{{ctx.Locale.Tr "repo.settings.tracker_issue_style.regexp_pattern"}}</label> <input id="external_tracker_regexp_pattern" name="external_tracker_regexp_pattern" value="{{(.Repository.MustGetUnit $.Context $.UnitTypeExternalTracker).ExternalTrackerConfig.ExternalTrackerRegexpPattern}}"> - <p class="help">{{ctx.Locale.Tr "repo.settings.tracker_issue_style.regexp_pattern_desc" | Str2html}}</p> + <p class="help">{{ctx.Locale.Tr "repo.settings.tracker_issue_style.regexp_pattern_desc"}}</p> </div> </div> </div> diff --git a/templates/repo/settings/protected_branch.tmpl b/templates/repo/settings/protected_branch.tmpl index e2f841f758..e57509abc0 100644 --- a/templates/repo/settings/protected_branch.tmpl +++ b/templates/repo/settings/protected_branch.tmpl @@ -2,7 +2,7 @@ <div class="repo-setting-content"> <form class="ui form" action="{{.Link}}" method="post"> <h4 class="ui top attached header"> - {{ctx.Locale.Tr "repo.settings.branch_protection" (.Rule.RuleName|Escape) | Str2html}} + {{ctx.Locale.Tr "repo.settings.branch_protection" (.Rule.RuleName|Escape)}} </h4> <div class="ui attached segment branch-protection"> <h5 class="ui dividing header">{{ctx.Locale.Tr "repo.settings.protect_patterns"}}</h5> diff --git a/templates/repo/settings/webhook/dingtalk.tmpl b/templates/repo/settings/webhook/dingtalk.tmpl index 32ca0d0807..0ba99e98ee 100644 --- a/templates/repo/settings/webhook/dingtalk.tmpl +++ b/templates/repo/settings/webhook/dingtalk.tmpl @@ -1,5 +1,5 @@ {{if eq .HookType "dingtalk"}} - <p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://dingtalk.com" (ctx.Locale.Tr "repo.settings.web_hook_name_dingtalk") | Str2html}}</p> + <p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://dingtalk.com" (ctx.Locale.Tr "repo.settings.web_hook_name_dingtalk")}}</p> <form class="ui form" action="{{.BaseLink}}/dingtalk/{{or .Webhook.ID "new"}}" method="post"> {{.CsrfTokenHtml}} <div class="required field {{if .Err_PayloadURL}}error{{end}}"> diff --git a/templates/repo/settings/webhook/discord.tmpl b/templates/repo/settings/webhook/discord.tmpl index 25dc219ee1..104346e042 100644 --- a/templates/repo/settings/webhook/discord.tmpl +++ b/templates/repo/settings/webhook/discord.tmpl @@ -1,5 +1,5 @@ {{if eq .HookType "discord"}} - <p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://discord.com" (ctx.Locale.Tr "repo.settings.web_hook_name_discord") | Str2html}}</p> + <p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://discord.com" (ctx.Locale.Tr "repo.settings.web_hook_name_discord")}}</p> <form class="ui form" action="{{.BaseLink}}/discord/{{or .Webhook.ID "new"}}" method="post"> {{.CsrfTokenHtml}} <div class="required field {{if .Err_PayloadURL}}error{{end}}"> diff --git a/templates/repo/settings/webhook/feishu.tmpl b/templates/repo/settings/webhook/feishu.tmpl index 9683427fbf..d80deab26f 100644 --- a/templates/repo/settings/webhook/feishu.tmpl +++ b/templates/repo/settings/webhook/feishu.tmpl @@ -1,6 +1,6 @@ {{if eq .HookType "feishu"}} - <p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://feishu.cn" (ctx.Locale.Tr "repo.settings.web_hook_name_feishu") | Str2html}}</p> - <p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://larksuite.com" (ctx.Locale.Tr "repo.settings.web_hook_name_larksuite") | Str2html}}</p> + <p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://feishu.cn" (ctx.Locale.Tr "repo.settings.web_hook_name_feishu")}}</p> + <p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://larksuite.com" (ctx.Locale.Tr "repo.settings.web_hook_name_larksuite")}}</p> <form class="ui form" action="{{.BaseLink}}/feishu/{{or .Webhook.ID "new"}}" method="post"> {{.CsrfTokenHtml}} <div class="required field {{if .Err_PayloadURL}}error{{end}}"> diff --git a/templates/repo/settings/webhook/gitea.tmpl b/templates/repo/settings/webhook/gitea.tmpl index 4fda6a7b39..e6eb61ea92 100644 --- a/templates/repo/settings/webhook/gitea.tmpl +++ b/templates/repo/settings/webhook/gitea.tmpl @@ -1,5 +1,5 @@ {{if eq .HookType "gitea"}} - <p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://docs.gitea.com/usage/webhooks" (ctx.Locale.Tr "repo.settings.web_hook_name_gitea") | Str2html}}</p> + <p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://docs.gitea.com/usage/webhooks" (ctx.Locale.Tr "repo.settings.web_hook_name_gitea")}}</p> <form class="ui form" action="{{.BaseLink}}/gitea/{{or .Webhook.ID "new"}}" method="post"> {{template "base/disable_form_autofill"}} {{.CsrfTokenHtml}} diff --git a/templates/repo/settings/webhook/gogs.tmpl b/templates/repo/settings/webhook/gogs.tmpl index d2bd98c32c..e91a3279e4 100644 --- a/templates/repo/settings/webhook/gogs.tmpl +++ b/templates/repo/settings/webhook/gogs.tmpl @@ -1,5 +1,5 @@ {{if eq .HookType "gogs"}} - <p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://docs.gitea.com/usage/webhooks" (ctx.Locale.Tr "repo.settings.web_hook_name_gogs") | Str2html}}</p> + <p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://docs.gitea.com/usage/webhooks" (ctx.Locale.Tr "repo.settings.web_hook_name_gogs")}}</p> <form class="ui form" action="{{.BaseLink}}/gogs/{{or .Webhook.ID "new"}}" method="post"> {{template "base/disable_form_autofill"}} {{.CsrfTokenHtml}} diff --git a/templates/repo/settings/webhook/matrix.tmpl b/templates/repo/settings/webhook/matrix.tmpl index a2a9921d7b..7f1c9f08e6 100644 --- a/templates/repo/settings/webhook/matrix.tmpl +++ b/templates/repo/settings/webhook/matrix.tmpl @@ -1,5 +1,5 @@ {{if eq .HookType "matrix"}} - <p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://matrix.org/" (ctx.Locale.Tr "repo.settings.web_hook_name_matrix") | Str2html}}</p> + <p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://matrix.org/" (ctx.Locale.Tr "repo.settings.web_hook_name_matrix")}}</p> <form class="ui form" action="{{.BaseLink}}/matrix/{{or .Webhook.ID "new"}}" method="post"> {{.CsrfTokenHtml}} <div class="required field {{if .Err_HomeserverURL}}error{{end}}"> diff --git a/templates/repo/settings/webhook/msteams.tmpl b/templates/repo/settings/webhook/msteams.tmpl index 0097209db1..62ea24e763 100644 --- a/templates/repo/settings/webhook/msteams.tmpl +++ b/templates/repo/settings/webhook/msteams.tmpl @@ -1,5 +1,5 @@ {{if eq .HookType "msteams"}} - <p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://teams.microsoft.com" (ctx.Locale.Tr "repo.settings.web_hook_name_msteams") | Str2html}}</p> + <p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://teams.microsoft.com" (ctx.Locale.Tr "repo.settings.web_hook_name_msteams")}}</p> <form class="ui form" action="{{.BaseLink}}/msteams/{{or .Webhook.ID "new"}}" method="post"> {{.CsrfTokenHtml}} <div class="required field {{if .Err_PayloadURL}}error{{end}}"> diff --git a/templates/repo/settings/webhook/packagist.tmpl b/templates/repo/settings/webhook/packagist.tmpl index fc373951d1..25aba2a435 100644 --- a/templates/repo/settings/webhook/packagist.tmpl +++ b/templates/repo/settings/webhook/packagist.tmpl @@ -1,5 +1,5 @@ {{if eq .HookType "packagist"}} - <p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://packagist.org" (ctx.Locale.Tr "repo.settings.web_hook_name_packagist") | Str2html}}</p> + <p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://packagist.org" (ctx.Locale.Tr "repo.settings.web_hook_name_packagist")}}</p> <form class="ui form" action="{{.BaseLink}}/packagist/{{or .Webhook.ID "new"}}" method="post"> {{.CsrfTokenHtml}} <div class="required field {{if .Err_Username}}error{{end}}"> diff --git a/templates/repo/settings/webhook/settings.tmpl b/templates/repo/settings/webhook/settings.tmpl index 8e2387067e..f636108b37 100644 --- a/templates/repo/settings/webhook/settings.tmpl +++ b/templates/repo/settings/webhook/settings.tmpl @@ -5,19 +5,19 @@ <div class="field"> <div class="ui radio non-events checkbox"> <input name="events" type="radio" value="push_only" {{if or $isNew .Webhook.PushOnly}}checked{{end}}> - <label>{{ctx.Locale.Tr "repo.settings.event_push_only" | Str2html}}</label> + <label>{{ctx.Locale.Tr "repo.settings.event_push_only"}}</label> </div> </div> <div class="field"> <div class="ui radio non-events checkbox"> <input name="events" type="radio" value="send_everything" {{if .Webhook.SendEverything}}checked{{end}}> - <label>{{ctx.Locale.Tr "repo.settings.event_send_everything" | Str2html}}</label> + <label>{{ctx.Locale.Tr "repo.settings.event_send_everything"}}</label> </div> </div> <div class="field"> <div class="ui radio events checkbox"> <input name="events" type="radio" value="choose_events" {{if .Webhook.ChooseEvents}}checked{{end}}> - <label>{{ctx.Locale.Tr "repo.settings.event_choose" | Str2html}}</label> + <label>{{ctx.Locale.Tr "repo.settings.event_choose"}}</label> </div> </div> </div> @@ -255,7 +255,7 @@ <div class="field"> <label for="branch_filter">{{ctx.Locale.Tr "repo.settings.branch_filter"}}</label> <input id="branch_filter" name="branch_filter" type="text" value="{{or .Webhook.BranchFilter "*"}}"> - <span class="help">{{ctx.Locale.Tr "repo.settings.branch_filter_desc" | Str2html}}</span> + <span class="help">{{ctx.Locale.Tr "repo.settings.branch_filter_desc"}}</span> </div> <!-- Authorization Header --> diff --git a/templates/repo/settings/webhook/slack.tmpl b/templates/repo/settings/webhook/slack.tmpl index b367aed5ec..e7cae92d4b 100644 --- a/templates/repo/settings/webhook/slack.tmpl +++ b/templates/repo/settings/webhook/slack.tmpl @@ -1,5 +1,5 @@ {{if eq .HookType "slack"}} - <p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://slack.com" (ctx.Locale.Tr "repo.settings.web_hook_name_slack") | Str2html}}</p> + <p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://slack.com" (ctx.Locale.Tr "repo.settings.web_hook_name_slack")}}</p> <form class="ui form" action="{{.BaseLink}}/slack/{{or .Webhook.ID "new"}}" method="post"> {{.CsrfTokenHtml}} <div class="required field {{if .Err_PayloadURL}}error{{end}}"> diff --git a/templates/repo/settings/webhook/telegram.tmpl b/templates/repo/settings/webhook/telegram.tmpl index 92bbbef3fd..f92c2be0db 100644 --- a/templates/repo/settings/webhook/telegram.tmpl +++ b/templates/repo/settings/webhook/telegram.tmpl @@ -1,5 +1,5 @@ {{if eq .HookType "telegram"}} - <p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://core.telegram.org/bots" (ctx.Locale.Tr "repo.settings.web_hook_name_telegram") | Str2html}}</p> + <p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://core.telegram.org/bots" (ctx.Locale.Tr "repo.settings.web_hook_name_telegram")}}</p> <form class="ui form" action="{{.BaseLink}}/telegram/{{or .Webhook.ID "new"}}" method="post"> {{.CsrfTokenHtml}} <div class="required field {{if .Err_BotToken}}error{{end}}"> diff --git a/templates/repo/settings/webhook/wechatwork.tmpl b/templates/repo/settings/webhook/wechatwork.tmpl index 65f12998b1..78a1617123 100644 --- a/templates/repo/settings/webhook/wechatwork.tmpl +++ b/templates/repo/settings/webhook/wechatwork.tmpl @@ -1,5 +1,5 @@ {{if eq .HookType "wechatwork"}} - <p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://work.weixin.qq.com" (ctx.Locale.Tr "repo.settings.web_hook_name_wechatwork") | Str2html}}</p> + <p>{{ctx.Locale.Tr "repo.settings.add_web_hook_desc" "https://work.weixin.qq.com" (ctx.Locale.Tr "repo.settings.web_hook_name_wechatwork")}}</p> <form class="ui form" action="{{.BaseLink}}/wechatwork/{{or .Webhook.ID "new"}}" method="post"> {{.CsrfTokenHtml}} <div class="required field {{if .Err_PayloadURL}}error{{end}}"> diff --git a/templates/repo/unicode_escape_prompt.tmpl b/templates/repo/unicode_escape_prompt.tmpl index d0730f23c1..c9f8cd38c1 100644 --- a/templates/repo/unicode_escape_prompt.tmpl +++ b/templates/repo/unicode_escape_prompt.tmpl @@ -5,9 +5,9 @@ <div class="header"> {{ctx.Locale.Tr "repo.invisible_runes_header"}} </div> - <p>{{ctx.Locale.Tr "repo.invisible_runes_description" | Str2html}}</p> + <p>{{ctx.Locale.Tr "repo.invisible_runes_description"}}</p> {{if .EscapeStatus.HasAmbiguous}} - <p>{{ctx.Locale.Tr "repo.ambiguous_runes_description" | Str2html}}</p> + <p>{{ctx.Locale.Tr "repo.ambiguous_runes_description"}}</p> {{end}} </div> {{else if .EscapeStatus.HasAmbiguous}} @@ -16,7 +16,7 @@ <div class="header"> {{ctx.Locale.Tr "repo.ambiguous_runes_header"}} </div> - <p>{{ctx.Locale.Tr "repo.ambiguous_runes_description" | Str2html}}</p> + <p>{{ctx.Locale.Tr "repo.ambiguous_runes_description"}}</p> </div> {{end}} {{end}} diff --git a/templates/status/500.tmpl b/templates/status/500.tmpl index edcb90f9a4..d6cff28174 100644 --- a/templates/status/500.tmpl +++ b/templates/status/500.tmpl @@ -42,7 +42,7 @@ {{end}} <div class="center gt-mt-5"> {{if or .SignedUser.IsAdmin .ShowFooterVersion}}<p>{{ctx.Locale.Tr "admin.config.app_ver"}}: {{AppVer}}</p>{{end}} - {{if .SignedUser.IsAdmin}}<p>{{ctx.Locale.Tr "error.report_message" | Str2html}}</p>{{end}} + {{if .SignedUser.IsAdmin}}<p>{{ctx.Locale.Tr "error.report_message"}}</p>{{end}} </div> </div> </div> diff --git a/templates/user/auth/activate.tmpl b/templates/user/auth/activate.tmpl index 1b06719753..589899f9d3 100644 --- a/templates/user/auth/activate.tmpl +++ b/templates/user/auth/activate.tmpl @@ -15,7 +15,7 @@ {{else if .ResendLimited}} <p class="center">{{ctx.Locale.Tr "auth.resent_limit_prompt"}}</p> {{else}} - <p>{{ctx.Locale.Tr "auth.confirmation_mail_sent_prompt" (.SignedUser.Email|Escape) .ActiveCodeLives | Str2html}}</p> + <p>{{ctx.Locale.Tr "auth.confirmation_mail_sent_prompt" (.SignedUser.Email|Escape) .ActiveCodeLives}}</p> {{end}} {{else}} {{if .NeedsPassword}} @@ -29,7 +29,7 @@ </div> <input id="code" name="code" type="hidden" value="{{.Code}}"> {{else if .IsSendRegisterMail}} - <p>{{ctx.Locale.Tr "auth.confirmation_mail_sent_prompt" (.Email|Escape) .ActiveCodeLives | Str2html}}</p> + <p>{{ctx.Locale.Tr "auth.confirmation_mail_sent_prompt" (.Email|Escape) .ActiveCodeLives}}</p> {{else if .IsCodeInvalid}} <p>{{ctx.Locale.Tr "auth.invalid_code"}}</p> {{else if .IsPasswordInvalid}} @@ -37,7 +37,7 @@ {{else if .ManualActivationOnly}} <p class="center">{{ctx.Locale.Tr "auth.manual_activation_only"}}</p> {{else}} - <p>{{ctx.Locale.Tr "auth.has_unconfirmed_mail" (.SignedUser.Name|Escape) (.SignedUser.Email|Escape) | Str2html}}</p> + <p>{{ctx.Locale.Tr "auth.has_unconfirmed_mail" (.SignedUser.Name|Escape) (.SignedUser.Email|Escape)}}</p> <div class="divider"></div> <div class="text right"> <button class="ui primary button">{{ctx.Locale.Tr "auth.resend_mail"}}</button> diff --git a/templates/user/auth/finalize_openid.tmpl b/templates/user/auth/finalize_openid.tmpl index 7449e3beda..1c1dcdb825 100644 --- a/templates/user/auth/finalize_openid.tmpl +++ b/templates/user/auth/finalize_openid.tmpl @@ -35,7 +35,7 @@ {{if .ShowRegistrationButton}} <div class="inline field"> <label></label> - <a href="{{AppSubUrl}}/user/sign_up">{{ctx.Locale.Tr "auth.sign_up_now" | Str2html}}</a> + <a href="{{AppSubUrl}}/user/sign_up">{{ctx.Locale.Tr "auth.sign_up_now"}}</a> </div> {{end}} </form> diff --git a/templates/user/auth/forgot_passwd.tmpl b/templates/user/auth/forgot_passwd.tmpl index dde4c8f6fe..03621ea87f 100644 --- a/templates/user/auth/forgot_passwd.tmpl +++ b/templates/user/auth/forgot_passwd.tmpl @@ -10,7 +10,7 @@ <div class="ui attached segment"> {{template "base/alert" .}} {{if .IsResetSent}} - <p>{{ctx.Locale.Tr "auth.reset_password_mail_sent_prompt" (Escape .Email) .ResetPwdCodeLives | Str2html}}</p> + <p>{{ctx.Locale.Tr "auth.reset_password_mail_sent_prompt" (Escape .Email) .ResetPwdCodeLives}}</p> {{else if .IsResetRequest}} <div class="required inline field {{if .Err_Email}}error{{end}}"> <label for="email">{{ctx.Locale.Tr "email"}}</label> diff --git a/templates/user/auth/grant.tmpl b/templates/user/auth/grant.tmpl index 9c0bf33e28..cb9bba8749 100644 --- a/templates/user/auth/grant.tmpl +++ b/templates/user/auth/grant.tmpl @@ -9,11 +9,11 @@ {{template "base/alert" .}} <p> <b>{{ctx.Locale.Tr "auth.authorize_application_description"}}</b><br> - {{ctx.Locale.Tr "auth.authorize_application_created_by" .ApplicationCreatorLinkHTML | Str2html}} + {{ctx.Locale.Tr "auth.authorize_application_created_by" .ApplicationCreatorLinkHTML}} </p> </div> <div class="ui attached segment"> - <p>{{ctx.Locale.Tr "auth.authorize_redirect_notice" .ApplicationRedirectDomainHTML | Str2html}}</p> + <p>{{ctx.Locale.Tr "auth.authorize_redirect_notice" .ApplicationRedirectDomainHTML}}</p> </div> <div class="ui attached segment"> <form method="post" action="{{AppSubUrl}}/login/oauth/grant"> diff --git a/templates/user/auth/reset_passwd.tmpl b/templates/user/auth/reset_passwd.tmpl index 2f470df441..9fee30f554 100644 --- a/templates/user/auth/reset_passwd.tmpl +++ b/templates/user/auth/reset_passwd.tmpl @@ -34,7 +34,7 @@ <h4 class="ui dividing header"> {{ctx.Locale.Tr "twofa"}} </h4> - <div class="ui warning visible message">{{ctx.Locale.Tr "settings.twofa_is_enrolled" | Str2html}}</div> + <div class="ui warning visible message">{{ctx.Locale.Tr "settings.twofa_is_enrolled"}}</div> {{if .scratch_code}} <div class="required inline field {{if .Err_Token}}error{{end}}"> <label for="token">{{ctx.Locale.Tr "auth.scratch_code"}}</label> @@ -53,11 +53,11 @@ <label></label> <button class="ui primary button">{{ctx.Locale.Tr "auth.reset_password_helper"}}</button> {{if and .has_two_factor (not .scratch_code)}} - <a href="{{.Link}}?code={{.Code}}&scratch_code=true">{{ctx.Locale.Tr "auth.use_scratch_code" | Str2html}}</a> + <a href="{{.Link}}?code={{.Code}}&scratch_code=true">{{ctx.Locale.Tr "auth.use_scratch_code"}}</a> {{end}} </div> {{else}} - <p class="center">{{ctx.Locale.Tr "auth.invalid_code_forgot_password" (printf "%s/user/forgot_password" AppSubUrl) | Str2html}}</p> + <p class="center">{{ctx.Locale.Tr "auth.invalid_code_forgot_password" (printf "%s/user/forgot_password" AppSubUrl)}}</p> {{end}} </div> </form> diff --git a/templates/user/auth/signin_inner.tmpl b/templates/user/auth/signin_inner.tmpl index 40e54ec8fa..0d0064b02a 100644 --- a/templates/user/auth/signin_inner.tmpl +++ b/templates/user/auth/signin_inner.tmpl @@ -48,7 +48,7 @@ {{if .ShowRegistrationButton}} <div class="inline field"> <label></label> - <a href="{{AppSubUrl}}/user/sign_up">{{ctx.Locale.Tr "auth.sign_up_now" | Str2html}}</a> + <a href="{{AppSubUrl}}/user/sign_up">{{ctx.Locale.Tr "auth.sign_up_now"}}</a> </div> {{end}} diff --git a/templates/user/auth/twofa.tmpl b/templates/user/auth/twofa.tmpl index d325114155..5260178d13 100644 --- a/templates/user/auth/twofa.tmpl +++ b/templates/user/auth/twofa.tmpl @@ -17,7 +17,7 @@ <div class="inline field"> <label></label> <button class="ui primary button">{{ctx.Locale.Tr "auth.verify"}}</button> - <a href="{{AppSubUrl}}/user/two_factor/scratch">{{ctx.Locale.Tr "auth.use_scratch_code" | Str2html}}</a> + <a href="{{AppSubUrl}}/user/two_factor/scratch">{{ctx.Locale.Tr "auth.use_scratch_code"}}</a> </div> </div> </form> diff --git a/templates/user/dashboard/feeds.tmpl b/templates/user/dashboard/feeds.tmpl index a51365e4d6..bb619a5f18 100644 --- a/templates/user/dashboard/feeds.tmpl +++ b/templates/user/dashboard/feeds.tmpl @@ -12,71 +12,71 @@ {{.ShortActUserName ctx}} {{end}} {{if .GetOpType.InActions "create_repo"}} - {{ctx.Locale.Tr "action.create_repo" ((.GetRepoLink ctx)|Escape) ((.ShortRepoPath ctx)|Escape) | Str2html}} + {{ctx.Locale.Tr "action.create_repo" ((.GetRepoLink ctx)|Escape) ((.ShortRepoPath ctx)|Escape)}} {{else if .GetOpType.InActions "rename_repo"}} - {{ctx.Locale.Tr "action.rename_repo" (.GetContent|Escape) ((.GetRepoLink ctx)|Escape) ((.ShortRepoPath ctx)|Escape) | Str2html}} + {{ctx.Locale.Tr "action.rename_repo" (.GetContent|Escape) ((.GetRepoLink ctx)|Escape) ((.ShortRepoPath ctx)|Escape)}} {{else if .GetOpType.InActions "commit_repo"}} {{if .Content}} - {{ctx.Locale.Tr "action.commit_repo" ((.GetRepoLink ctx)|Escape) ((.GetRefLink ctx)|Escape) (Escape .GetBranch) ((.ShortRepoPath ctx)|Escape) | Str2html}} + {{ctx.Locale.Tr "action.commit_repo" ((.GetRepoLink ctx)|Escape) ((.GetRefLink ctx)|Escape) (Escape .GetBranch) ((.ShortRepoPath ctx)|Escape)}} {{else}} - {{ctx.Locale.Tr "action.create_branch" ((.GetRepoLink ctx)|Escape) ((.GetRefLink ctx)|Escape) (Escape .GetBranch) ((.ShortRepoPath ctx)|Escape) | Str2html}} + {{ctx.Locale.Tr "action.create_branch" ((.GetRepoLink ctx)|Escape) ((.GetRefLink ctx)|Escape) (Escape .GetBranch) ((.ShortRepoPath ctx)|Escape)}} {{end}} {{else if .GetOpType.InActions "create_issue"}} {{$index := index .GetIssueInfos 0}} - {{ctx.Locale.Tr "action.create_issue" ((printf "%s/issues/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}} + {{ctx.Locale.Tr "action.create_issue" ((printf "%s/issues/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape)}} {{else if .GetOpType.InActions "create_pull_request"}} {{$index := index .GetIssueInfos 0}} - {{ctx.Locale.Tr "action.create_pull_request" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}} + {{ctx.Locale.Tr "action.create_pull_request" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape)}} {{else if .GetOpType.InActions "transfer_repo"}} - {{ctx.Locale.Tr "action.transfer_repo" .GetContent ((.GetRepoLink ctx)|Escape) ((.ShortRepoPath ctx)|Escape) | Str2html}} + {{ctx.Locale.Tr "action.transfer_repo" .GetContent ((.GetRepoLink ctx)|Escape) ((.ShortRepoPath ctx)|Escape)}} {{else if .GetOpType.InActions "push_tag"}} - {{ctx.Locale.Tr "action.push_tag" ((.GetRepoLink ctx)|Escape) ((.GetRefLink ctx)|Escape) (.GetTag|Escape) ((.ShortRepoPath ctx)|Escape) | Str2html}} + {{ctx.Locale.Tr "action.push_tag" ((.GetRepoLink ctx)|Escape) ((.GetRefLink ctx)|Escape) (.GetTag|Escape) ((.ShortRepoPath ctx)|Escape)}} {{else if .GetOpType.InActions "comment_issue"}} {{$index := index .GetIssueInfos 0}} - {{ctx.Locale.Tr "action.comment_issue" ((printf "%s/issues/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}} + {{ctx.Locale.Tr "action.comment_issue" ((printf "%s/issues/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape)}} {{else if .GetOpType.InActions "merge_pull_request"}} {{$index := index .GetIssueInfos 0}} - {{ctx.Locale.Tr "action.merge_pull_request" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}} + {{ctx.Locale.Tr "action.merge_pull_request" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape)}} {{else if .GetOpType.InActions "close_issue"}} {{$index := index .GetIssueInfos 0}} - {{ctx.Locale.Tr "action.close_issue" ((printf "%s/issues/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}} + {{ctx.Locale.Tr "action.close_issue" ((printf "%s/issues/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape)}} {{else if .GetOpType.InActions "reopen_issue"}} {{$index := index .GetIssueInfos 0}} - {{ctx.Locale.Tr "action.reopen_issue" ((printf "%s/issues/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}} + {{ctx.Locale.Tr "action.reopen_issue" ((printf "%s/issues/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape)}} {{else if .GetOpType.InActions "close_pull_request"}} {{$index := index .GetIssueInfos 0}} - {{ctx.Locale.Tr "action.close_pull_request" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}} + {{ctx.Locale.Tr "action.close_pull_request" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape)}} {{else if .GetOpType.InActions "reopen_pull_request"}} {{$index := index .GetIssueInfos 0}} - {{ctx.Locale.Tr "action.reopen_pull_request" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}} + {{ctx.Locale.Tr "action.reopen_pull_request" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape)}} {{else if .GetOpType.InActions "delete_tag"}} {{$index := index .GetIssueInfos 0}} - {{ctx.Locale.Tr "action.delete_tag" ((.GetRepoLink ctx)|Escape) (.GetTag|Escape) ((.ShortRepoPath ctx)|Escape) | Str2html}} + {{ctx.Locale.Tr "action.delete_tag" ((.GetRepoLink ctx)|Escape) (.GetTag|Escape) ((.ShortRepoPath ctx)|Escape)}} {{else if .GetOpType.InActions "delete_branch"}} {{$index := index .GetIssueInfos 0}} - {{ctx.Locale.Tr "action.delete_branch" ((.GetRepoLink ctx)|Escape) (.GetBranch|Escape) ((.ShortRepoPath ctx)|Escape) | Str2html}} + {{ctx.Locale.Tr "action.delete_branch" ((.GetRepoLink ctx)|Escape) (.GetBranch|Escape) ((.ShortRepoPath ctx)|Escape)}} {{else if .GetOpType.InActions "mirror_sync_push"}} - {{ctx.Locale.Tr "action.mirror_sync_push" ((.GetRepoLink ctx)|Escape) ((.GetRefLink ctx)|Escape) (.GetBranch|Escape) ((.ShortRepoPath ctx)|Escape) | Str2html}} + {{ctx.Locale.Tr "action.mirror_sync_push" ((.GetRepoLink ctx)|Escape) ((.GetRefLink ctx)|Escape) (.GetBranch|Escape) ((.ShortRepoPath ctx)|Escape)}} {{else if .GetOpType.InActions "mirror_sync_create"}} - {{ctx.Locale.Tr "action.mirror_sync_create" ((.GetRepoLink ctx)|Escape) ((.GetRefLink ctx)|Escape) (.GetBranch|Escape) ((.ShortRepoPath ctx)|Escape) | Str2html}} + {{ctx.Locale.Tr "action.mirror_sync_create" ((.GetRepoLink ctx)|Escape) ((.GetRefLink ctx)|Escape) (.GetBranch|Escape) ((.ShortRepoPath ctx)|Escape)}} {{else if .GetOpType.InActions "mirror_sync_delete"}} - {{ctx.Locale.Tr "action.mirror_sync_delete" ((.GetRepoLink ctx)|Escape) (.GetBranch|Escape) ((.ShortRepoPath ctx)|Escape) | Str2html}} + {{ctx.Locale.Tr "action.mirror_sync_delete" ((.GetRepoLink ctx)|Escape) (.GetBranch|Escape) ((.ShortRepoPath ctx)|Escape)}} {{else if .GetOpType.InActions "approve_pull_request"}} {{$index := index .GetIssueInfos 0}} - {{ctx.Locale.Tr "action.approve_pull_request" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}} + {{ctx.Locale.Tr "action.approve_pull_request" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape)}} {{else if .GetOpType.InActions "reject_pull_request"}} {{$index := index .GetIssueInfos 0}} - {{ctx.Locale.Tr "action.reject_pull_request" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}} + {{ctx.Locale.Tr "action.reject_pull_request" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape)}} {{else if .GetOpType.InActions "comment_pull"}} {{$index := index .GetIssueInfos 0}} - {{ctx.Locale.Tr "action.comment_pull" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}} + {{ctx.Locale.Tr "action.comment_pull" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape)}} {{else if .GetOpType.InActions "publish_release"}} {{$linkText := .Content | RenderEmoji $.Context}} - {{ctx.Locale.Tr "action.publish_release" ((.GetRepoLink ctx)|Escape) ((printf "%s/releases/tag/%s" (.GetRepoLink ctx) .GetTag)|Escape) ((.ShortRepoPath ctx)|Escape) $linkText | Str2html}} + {{ctx.Locale.Tr "action.publish_release" ((.GetRepoLink ctx)|Escape) ((printf "%s/releases/tag/%s" (.GetRepoLink ctx) .GetTag)|Escape) ((.ShortRepoPath ctx)|Escape) $linkText}} {{else if .GetOpType.InActions "review_dismissed"}} {{$index := index .GetIssueInfos 0}} {{$reviewer := index .GetIssueInfos 1}} - {{ctx.Locale.Tr "action.review_dismissed" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) $reviewer | Str2html}} + {{ctx.Locale.Tr "action.review_dismissed" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) $reviewer}} {{end}} {{TimeSince .GetCreate ctx.Locale}} </div> diff --git a/templates/user/settings/account.tmpl b/templates/user/settings/account.tmpl index 7c6fd49a08..bfcf423d67 100644 --- a/templates/user/settings/account.tmpl +++ b/templates/user/settings/account.tmpl @@ -133,9 +133,9 @@ </h4> <div class="ui attached error segment"> <div class="ui red message"> - <p class="text left">{{svg "octicon-alert"}} {{ctx.Locale.Tr "settings.delete_prompt" | Str2html}}</p> + <p class="text left">{{svg "octicon-alert"}} {{ctx.Locale.Tr "settings.delete_prompt"}}</p> {{if .UserDeleteWithComments}} - <p class="text left gt-font-semibold">{{ctx.Locale.Tr "settings.delete_with_all_comments" .UserDeleteWithCommentsMaxTime | Str2html}}</p> + <p class="text left gt-font-semibold">{{ctx.Locale.Tr "settings.delete_with_all_comments" .UserDeleteWithCommentsMaxTime}}</p> {{end}} </div> <form class="ui form ignore-dirty" id="delete-form" action="{{AppSubUrl}}/user/settings/account/delete" method="post"> diff --git a/templates/user/settings/applications.tmpl b/templates/user/settings/applications.tmpl index e7eb6c8180..8cf76d80a5 100644 --- a/templates/user/settings/applications.tmpl +++ b/templates/user/settings/applications.tmpl @@ -75,7 +75,7 @@ {{ctx.Locale.Tr "settings.select_permissions"}} </summary> <p class="activity meta"> - <i>{{ctx.Locale.Tr "settings.access_token_desc" (printf `href="/api/swagger" target="_blank"`) (printf `href="https://docs.gitea.com/development/oauth2-provider#scopes" target="_blank"`) | Str2html}}</i> + <i>{{ctx.Locale.Tr "settings.access_token_desc" (printf `href="/api/swagger" target="_blank"`) (printf `href="https://docs.gitea.com/development/oauth2-provider#scopes" target="_blank"`)}}</i> </p> <div class="scoped-access-token-mount"> <scoped-access-token-selector diff --git a/templates/user/settings/keys_gpg.tmpl b/templates/user/settings/keys_gpg.tmpl index 43ea667516..0dd0059511 100644 --- a/templates/user/settings/keys_gpg.tmpl +++ b/templates/user/settings/keys_gpg.tmpl @@ -43,7 +43,7 @@ <div class="flex-item"> <p> {{ctx.Locale.Tr "settings.gpg_desc"}}<br> - {{ctx.Locale.Tr "settings.gpg_helper" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/about-commit-signature-verification#gpg-commit-signature-verification" | Str2html}} + {{ctx.Locale.Tr "settings.gpg_helper" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/about-commit-signature-verification#gpg-commit-signature-verification"}} </p> </div> {{range .GPGKeys}} diff --git a/templates/user/settings/keys_ssh.tmpl b/templates/user/settings/keys_ssh.tmpl index 2d3225e61e..94ee2a1a55 100644 --- a/templates/user/settings/keys_ssh.tmpl +++ b/templates/user/settings/keys_ssh.tmpl @@ -31,7 +31,7 @@ <div class="flex-item"> <p> {{ctx.Locale.Tr "settings.ssh_desc"}}<br> - {{ctx.Locale.Tr "settings.ssh_helper" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/connecting-to-github-with-ssh" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/troubleshooting-ssh" | Str2html}} + {{ctx.Locale.Tr "settings.ssh_helper" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/connecting-to-github-with-ssh" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/troubleshooting-ssh"}} </p> </div> {{if .DisableSSH}} diff --git a/templates/user/settings/security/twofa.tmpl b/templates/user/settings/security/twofa.tmpl index 2f15fe13f1..adebce4265 100644 --- a/templates/user/settings/security/twofa.tmpl +++ b/templates/user/settings/security/twofa.tmpl @@ -4,7 +4,7 @@ <div class="ui attached segment"> <p>{{ctx.Locale.Tr "settings.twofa_desc"}}</p> {{if .TOTPEnrolled}} - <p>{{ctx.Locale.Tr "settings.twofa_is_enrolled" | Str2html}}</p> + <p>{{ctx.Locale.Tr "settings.twofa_is_enrolled"}}</p> <form class="ui form" action="{{AppSubUrl}}/user/settings/security/two_factor/regenerate_scratch" method="post" enctype="multipart/form-data"> {{.CsrfTokenHtml}} <p>{{ctx.Locale.Tr "settings.regenerate_scratch_token_desc"}}</p> diff --git a/templates/user/settings/security/webauthn.tmpl b/templates/user/settings/security/webauthn.tmpl index e582b801da..eceee191bd 100644 --- a/templates/user/settings/security/webauthn.tmpl +++ b/templates/user/settings/security/webauthn.tmpl @@ -1,6 +1,6 @@ <h4 class="ui top attached header">{{ctx.Locale.Tr "settings.webauthn"}}</h4> <div class="ui attached segment"> - <p>{{ctx.Locale.Tr "settings.webauthn_desc" | Str2html}}</p> + <p>{{ctx.Locale.Tr "settings.webauthn_desc"}}</p> <p>{{ctx.Locale.Tr "settings.webauthn_key_loss_warning"}} {{ctx.Locale.Tr "settings.webauthn_alternative_tip"}}</p> {{template "user/auth/webauthn_error" .}} <div class="flex-list"> |