Skip to content

Commit

Permalink
Remove unnecessary "Str2html" modifier from templates (#29319)
Browse files Browse the repository at this point in the history
Follow #29165
  • Loading branch information
wxiaoguang authored Feb 22, 2024
1 parent 5ed17d9 commit c9d0e63
Show file tree
Hide file tree
Showing 58 changed files with 121 additions and 120 deletions.
7 changes: 4 additions & 3 deletions routers/web/auth/oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"errors"
"fmt"
"html"
"html/template"
"io"
"net/http"
"net/url"
Expand Down Expand Up @@ -499,11 +500,11 @@ func AuthorizeOAuth(ctx *context.Context) {
ctx.Data["Scope"] = form.Scope
ctx.Data["Nonce"] = form.Nonce
if user != nil {
ctx.Data["ApplicationCreatorLinkHTML"] = fmt.Sprintf(`<a href="%s">@%s</a>`, html.EscapeString(user.HomeLink()), html.EscapeString(user.Name))
ctx.Data["ApplicationCreatorLinkHTML"] = template.HTML(fmt.Sprintf(`<a href="%s">@%s</a>`, html.EscapeString(user.HomeLink()), html.EscapeString(user.Name)))
} else {
ctx.Data["ApplicationCreatorLinkHTML"] = fmt.Sprintf(`<a href="%s">%s</a>`, html.EscapeString(setting.AppSubURL+"/"), html.EscapeString(setting.AppName))
ctx.Data["ApplicationCreatorLinkHTML"] = template.HTML(fmt.Sprintf(`<a href="%s">%s</a>`, html.EscapeString(setting.AppSubURL+"/"), html.EscapeString(setting.AppName)))
}
ctx.Data["ApplicationRedirectDomainHTML"] = "<strong>" + html.EscapeString(form.RedirectURI) + "</strong>"
ctx.Data["ApplicationRedirectDomainHTML"] = template.HTML("<strong>" + html.EscapeString(form.RedirectURI) + "</strong>")
// TODO document SESSION <=> FORM
err = ctx.Session.Set("client_id", app.ClientID)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/dashboard.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
2 changes: 1 addition & 1 deletion templates/code/searchcombo.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
8 changes: 4 additions & 4 deletions templates/home.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
{{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">
<h1 class="hero ui icon header">
{{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>
Expand All @@ -35,15 +35,15 @@
{{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">
<h1 class="hero ui icon header">
{{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>
Expand Down
4 changes: 2 additions & 2 deletions templates/mail/auth/activate.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions templates/mail/auth/activate_email.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions templates/mail/auth/register_notify.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions templates/mail/auth/reset_passwd.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
22 changes: 11 additions & 11 deletions templates/mail/issue/default.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand All @@ -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}}
Expand Down
2 changes: 1 addition & 1 deletion templates/mail/team_invite.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion templates/org/settings/delete.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
2 changes: 1 addition & 1 deletion templates/org/settings/labels.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion templates/org/team/invite.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions templates/org/team/new.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
10 changes: 5 additions & 5 deletions templates/org/team/sidebar.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,27 @@
</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>
{{end}}
</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>
Expand Down
4 changes: 2 additions & 2 deletions templates/repo/blame.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/branch/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/create.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/diff/box.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/diff/stats.tmpl
Original file line number Diff line number Diff line change
@@ -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>
2 changes: 1 addition & 1 deletion templates/repo/empty.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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)}}
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/issue/labels/label_list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/issue/view_content.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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>
2 changes: 1 addition & 1 deletion templates/repo/migrate/options.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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"}}">
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/release/list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/search.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/settings/deploy_keys.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/settings/githooks.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
Loading

0 comments on commit c9d0e63

Please sign in to comment.