aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2024-02-25 22:02:20 +0800
committerGitHub <noreply@github.com>2024-02-25 14:02:20 +0000
commitd2f6588b66549b33adf8bac7044d03c89d668470 (patch)
tree7cc1109b7bd757ffd9e9e9cc2eb038b024290f3f /templates/repo
parentea164aba4b697aa08e4d20d896a8f318c09a6523 (diff)
downloadgitea-d2f6588b66549b33adf8bac7044d03c89d668470.tar.gz
gitea-d2f6588b66549b33adf8bac7044d03c89d668470.zip
Remove incorrect and unnecessary Escape from templates (#29394)
Follow #29165 * some of them are incorrect, which would lead to double escaping (eg: `(print (Escape $.RepoLink)`) * other of them are not necessary, because `Tr` handles strings&HTML automatically Suggest to review by "unified view": https://github.com/go-gitea/gitea/pull/29394/files?diff=unified&w=0
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/code/recently_pushed_new_branches.tmpl2
-rw-r--r--templates/repo/create_helper.tmpl2
-rw-r--r--templates/repo/diff/comments.tmpl6
-rw-r--r--templates/repo/diff/compare.tmpl8
-rw-r--r--templates/repo/editor/commit_form.tmpl2
-rw-r--r--templates/repo/issue/card.tmpl6
-rw-r--r--templates/repo/issue/new_form.tmpl2
-rw-r--r--templates/repo/issue/view_content.tmpl8
-rw-r--r--templates/repo/issue/view_content/comments.tmpl38
-rw-r--r--templates/repo/issue/view_content/conversation.tmpl2
-rw-r--r--templates/repo/issue/view_content/pull.tmpl4
-rw-r--r--templates/repo/issue/view_content/sidebar.tmpl8
-rw-r--r--templates/repo/issue/view_title.tmpl6
-rw-r--r--templates/repo/search.tmpl2
-rw-r--r--templates/repo/settings/protected_branch.tmpl2
-rw-r--r--templates/repo/wiki/view.tmpl2
16 files changed, 50 insertions, 50 deletions
diff --git a/templates/repo/code/recently_pushed_new_branches.tmpl b/templates/repo/code/recently_pushed_new_branches.tmpl
index 73c9c45178..fedba06fad 100644
--- a/templates/repo/code/recently_pushed_new_branches.tmpl
+++ b/templates/repo/code/recently_pushed_new_branches.tmpl
@@ -2,7 +2,7 @@
<div class="ui positive message gt-df gt-ac">
<div class="gt-f1">
{{$timeSince := TimeSince .CommitTime.AsTime ctx.Locale}}
- {{ctx.Locale.Tr "repo.pulls.recently_pushed_new_branches" (Escape .Name) $timeSince}}
+ {{ctx.Locale.Tr "repo.pulls.recently_pushed_new_branches" .Name $timeSince}}
</div>
<a role="button" class="ui compact positive button gt-m-0" href="{{$.Repository.ComposeBranchCompareURL $.Repository.BaseRepo .Name}}">
{{ctx.Locale.Tr "repo.pulls.compare_changes"}}
diff --git a/templates/repo/create_helper.tmpl b/templates/repo/create_helper.tmpl
index 6ca691592c..70c28b72e8 100644
--- a/templates/repo/create_helper.tmpl
+++ b/templates/repo/create_helper.tmpl
@@ -1,3 +1,3 @@
{{if not $.DisableMigrations}}
- <p class="ui center">{{ctx.Locale.Tr "repo.new_repo_helper" ((print AppSubUrl "/repo/migrate")|Escape)}}</p>
+ <p class="ui center">{{ctx.Locale.Tr "repo.new_repo_helper" (print AppSubUrl "/repo/migrate")}}</p>
{{end}}
diff --git a/templates/repo/diff/comments.tmpl b/templates/repo/diff/comments.tmpl
index b795074e49..e567417fa6 100644
--- a/templates/repo/diff/comments.tmpl
+++ b/templates/repo/diff/comments.tmpl
@@ -16,17 +16,17 @@
{{.OriginalAuthor}}
</span>
<span class="text grey muted-links">
- {{ctx.Locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr}}
+ {{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdStr}}
</span>
<span class="text migrate">
{{if $.root.Repository.OriginalURL}}
- ({{ctx.Locale.Tr "repo.migrated_from" ($.root.Repository.OriginalURL | Escape) ($.root.Repository.GetOriginalURLHostname | Escape)}})
+ ({{ctx.Locale.Tr "repo.migrated_from" $.root.Repository.OriginalURL $.root.Repository.GetOriginalURLHostname}})
{{end}}
</span>
{{else}}
<span class="text grey muted-links">
{{template "shared/user/namelink" .Poster}}
- {{ctx.Locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr}}
+ {{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdStr}}
</span>
{{end}}
</div>
diff --git a/templates/repo/diff/compare.tmpl b/templates/repo/diff/compare.tmpl
index 7a618ba8e6..819bd8a2f0 100644
--- a/templates/repo/diff/compare.tmpl
+++ b/templates/repo/diff/compare.tmpl
@@ -194,7 +194,7 @@
{{if .HasPullRequest}}
<div class="ui segment grid title">
<div class="twelve wide column issue-title">
- {{ctx.Locale.Tr "repo.pulls.has_pull_request" (print (Escape $.RepoLink) "/pulls/" .PullRequest.Issue.Index) (Escape $.RepoRelPath) .PullRequest.Index}}
+ {{ctx.Locale.Tr "repo.pulls.has_pull_request" (print $.RepoLink "/pulls/" .PullRequest.Issue.Index) $.RepoRelPath .PullRequest.Index}}
<h1>
<span id="issue-title">{{RenderIssueTitle $.Context .PullRequest.Issue.Title ($.Repository.ComposeMetas ctx)}}</span>
<span class="index">#{{.PullRequest.Issue.Index}}</span>
@@ -202,11 +202,11 @@
</div>
<div class="four wide column middle aligned text right">
{{- if .PullRequest.HasMerged -}}
- <a href="{{Escape $.RepoLink}}/pulls/{{.PullRequest.Issue.Index}}" class="ui button purple show-form">{{svg "octicon-git-merge" 16}} {{ctx.Locale.Tr "repo.pulls.view"}}</a>
+ <a href="{{$.RepoLink}}/pulls/{{.PullRequest.Issue.Index}}" class="ui button purple show-form">{{svg "octicon-git-merge" 16}} {{ctx.Locale.Tr "repo.pulls.view"}}</a>
{{else if .Issue.IsClosed}}
- <a href="{{Escape $.RepoLink}}/pulls/{{.PullRequest.Issue.Index}}" class="ui button red show-form">{{svg "octicon-issue-closed" 16}} {{ctx.Locale.Tr "repo.pulls.view"}}</a>
+ <a href="{{$.RepoLink}}/pulls/{{.PullRequest.Issue.Index}}" class="ui button red show-form">{{svg "octicon-issue-closed" 16}} {{ctx.Locale.Tr "repo.pulls.view"}}</a>
{{else}}
- <a href="{{Escape $.RepoLink}}/pulls/{{.PullRequest.Issue.Index}}" class="ui button primary show-form">{{svg "octicon-git-pull-request" 16}} {{ctx.Locale.Tr "repo.pulls.view"}}</a>
+ <a href="{{$.RepoLink}}/pulls/{{.PullRequest.Issue.Index}}" class="ui button primary show-form">{{svg "octicon-git-pull-request" 16}} {{ctx.Locale.Tr "repo.pulls.view"}}</a>
{{end}}
</div>
</div>
diff --git a/templates/repo/editor/commit_form.tmpl b/templates/repo/editor/commit_form.tmpl
index c8f062b5c5..f0f0f47826 100644
--- a/templates/repo/editor/commit_form.tmpl
+++ b/templates/repo/editor/commit_form.tmpl
@@ -26,7 +26,7 @@
<input type="radio" class="js-quick-pull-choice-option" name="commit_choice" value="direct" button_text="{{ctx.Locale.Tr "repo.editor.commit_changes"}}" {{if eq .commit_choice "direct"}}checked{{end}}>
<label>
{{svg "octicon-git-commit"}}
- {{ctx.Locale.Tr "repo.editor.commit_directly_to_this_branch" (.BranchName|Escape)}}
+ {{ctx.Locale.Tr "repo.editor.commit_directly_to_this_branch" .BranchName}}
{{if not .CanCommitToBranch.CanCommitToBranch}}
<div class="ui visible small warning message">
{{ctx.Locale.Tr "repo.editor.no_commit_to_branch"}}
diff --git a/templates/repo/issue/card.tmpl b/templates/repo/issue/card.tmpl
index 7b71bd724e..7fb3d82827 100644
--- a/templates/repo/issue/card.tmpl
+++ b/templates/repo/issue/card.tmpl
@@ -23,11 +23,11 @@
{{if not $.Page.Repository}}{{.Repo.FullName}}{{end}}#{{.Index}}
{{$timeStr := TimeSinceUnix .GetLastEventTimestamp ctx.Locale}}
{{if .OriginalAuthor}}
- {{ctx.Locale.Tr .GetLastEventLabelFake $timeStr (.OriginalAuthor|Escape)}}
+ {{ctx.Locale.Tr .GetLastEventLabelFake $timeStr .OriginalAuthor}}
{{else if gt .Poster.ID 0}}
- {{ctx.Locale.Tr .GetLastEventLabel $timeStr (.Poster.HomeLink|Escape) (.Poster.GetDisplayName | Escape)}}
+ {{ctx.Locale.Tr .GetLastEventLabel $timeStr .Poster.HomeLink .Poster.GetDisplayName}}
{{else}}
- {{ctx.Locale.Tr .GetLastEventLabelFake $timeStr (.Poster.GetDisplayName | Escape)}}
+ {{ctx.Locale.Tr .GetLastEventLabelFake $timeStr .Poster.GetDisplayName}}
{{end}}
</span>
</div>
diff --git a/templates/repo/issue/new_form.tmpl b/templates/repo/issue/new_form.tmpl
index d1cbba6873..8e4310f0bb 100644
--- a/templates/repo/issue/new_form.tmpl
+++ b/templates/repo/issue/new_form.tmpl
@@ -13,7 +13,7 @@
<div class="field">
<input name="title" id="issue_title" placeholder="{{ctx.Locale.Tr "repo.milestones.title"}}" value="{{if .TitleQuery}}{{.TitleQuery}}{{else if .IssueTemplateTitle}}{{.IssueTemplateTitle}}{{else}}{{.title}}{{end}}" autofocus required maxlength="255" autocomplete="off">
{{if .PageIsComparePull}}
- <div class="title_wip_desc" data-wip-prefixes="{{JsonUtils.EncodeToString .PullRequestWorkInProgressPrefixes}}">{{ctx.Locale.Tr "repo.pulls.title_wip_desc" (index .PullRequestWorkInProgressPrefixes 0| Escape)}}</div>
+ <div class="title_wip_desc" data-wip-prefixes="{{JsonUtils.EncodeToString .PullRequestWorkInProgressPrefixes}}">{{ctx.Locale.Tr "repo.pulls.title_wip_desc" (index .PullRequestWorkInProgressPrefixes 0)}}</div>
{{end}}
</div>
{{if .Fields}}
diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl
index 906f880140..b5441872a3 100644
--- a/templates/repo/issue/view_content.tmpl
+++ b/templates/repo/issue/view_content.tmpl
@@ -28,10 +28,10 @@
{{.Issue.OriginalAuthor}}
</span>
<span class="text grey muted-links">
- {{ctx.Locale.Tr "repo.issues.commented_at" (.Issue.HashTag|Escape) $createdStr}}
+ {{ctx.Locale.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr}}
</span>
<span class="text migrate">
- {{if .Repository.OriginalURL}} ({{ctx.Locale.Tr "repo.migrated_from" (.Repository.OriginalURL|Escape) (.Repository.GetOriginalURLHostname|Escape)}}){{end}}
+ {{if .Repository.OriginalURL}} ({{ctx.Locale.Tr "repo.migrated_from" .Repository.OriginalURL .Repository.GetOriginalURLHostname}}){{end}}
</span>
{{else}}
<a class="inline-timeline-avatar" href="{{.Issue.Poster.HomeLink}}">
@@ -39,7 +39,7 @@
</a>
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Issue.Poster}}
- {{ctx.Locale.Tr "repo.issues.commented_at" (.Issue.HashTag|Escape) $createdStr}}
+ {{ctx.Locale.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr}}
</span>
{{end}}
</div>
@@ -133,7 +133,7 @@
</div>
{{else}}
<div class="ui warning message">
- {{ctx.Locale.Tr "repo.issues.sign_in_require_desc" (.SignInLink|Escape)}}
+ {{ctx.Locale.Tr "repo.issues.sign_in_require_desc" .SignInLink}}
</div>
{{end}}
{{end}}{{/* end if: .IsSigned */}}
diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl
index e41f804043..b25a5ad1b4 100644
--- a/templates/repo/issue/view_content/comments.tmpl
+++ b/templates/repo/issue/view_content/comments.tmpl
@@ -33,10 +33,10 @@
{{.OriginalAuthor}}
</span>
<span class="text grey muted-links">
- {{ctx.Locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr}} {{if $.Repository.OriginalURL}}
+ {{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdStr}} {{if $.Repository.OriginalURL}}
</span>
<span class="text migrate">
- ({{ctx.Locale.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape)}}){{end}}
+ ({{ctx.Locale.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname}}){{end}}
</span>
{{else}}
{{if gt .Poster.ID 0}}
@@ -46,7 +46,7 @@
{{end}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
- {{ctx.Locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr}}
+ {{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdStr}}
</span>
{{end}}
</div>
@@ -121,7 +121,7 @@
{{else if eq .Type 3 5 6}}
{{$refFrom:= ""}}
{{if ne .RefRepoID .Issue.RepoID}}
- {{$refFrom = ctx.Locale.Tr "repo.issues.ref_from" (.RefRepo.FullName|Escape)}}
+ {{$refFrom = ctx.Locale.Tr "repo.issues.ref_from" .RefRepo.FullName}}
{{end}}
{{$refTr := "repo.issues.ref_issue_from"}}
{{if .Issue.IsPull}}
@@ -138,7 +138,7 @@
{{if eq .RefAction 3}}<del>{{end}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
- {{ctx.Locale.Tr $refTr (.EventTag|Escape) $createdStr ((.RefCommentLink ctx)|Escape) $refFrom}}
+ {{ctx.Locale.Tr $refTr .EventTag $createdStr (.RefCommentLink ctx) $refFrom}}
</span>
{{if eq .RefAction 3}}</del>{{end}}
@@ -182,7 +182,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
- {{if gt .OldMilestoneID 0}}{{if gt .MilestoneID 0}}{{ctx.Locale.Tr "repo.issues.change_milestone_at" (.OldMilestone.Name|Escape) (.Milestone.Name|Escape) $createdStr}}{{else}}{{ctx.Locale.Tr "repo.issues.remove_milestone_at" (.OldMilestone.Name|Escape) $createdStr}}{{end}}{{else if gt .MilestoneID 0}}{{ctx.Locale.Tr "repo.issues.add_milestone_at" (.Milestone.Name|Escape) $createdStr}}{{end}}
+ {{if gt .OldMilestoneID 0}}{{if gt .MilestoneID 0}}{{ctx.Locale.Tr "repo.issues.change_milestone_at" .OldMilestone.Name .Milestone.Name $createdStr}}{{else}}{{ctx.Locale.Tr "repo.issues.remove_milestone_at" .OldMilestone.Name $createdStr}}{{end}}{{else if gt .MilestoneID 0}}{{ctx.Locale.Tr "repo.issues.add_milestone_at" .Milestone.Name $createdStr}}{{end}}
</span>
</div>
{{else if and (eq .Type 9) (gt .AssigneeID 0)}}
@@ -195,7 +195,7 @@
{{if eq .Poster.ID .Assignee.ID}}
{{ctx.Locale.Tr "repo.issues.remove_self_assignment" $createdStr}}
{{else}}
- {{ctx.Locale.Tr "repo.issues.remove_assignee_at" (.Poster.GetDisplayName|Escape) $createdStr}}
+ {{ctx.Locale.Tr "repo.issues.remove_assignee_at" .Poster.GetDisplayName $createdStr}}
{{end}}
</span>
{{else}}
@@ -205,7 +205,7 @@
{{if eq .Poster.ID .AssigneeID}}
{{ctx.Locale.Tr "repo.issues.self_assign_at" $createdStr}}
{{else}}
- {{ctx.Locale.Tr "repo.issues.add_assignee_at" (.Poster.GetDisplayName|Escape) $createdStr}}
+ {{ctx.Locale.Tr "repo.issues.add_assignee_at" .Poster.GetDisplayName $createdStr}}
{{end}}
</span>
{{end}}
@@ -225,7 +225,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
- {{ctx.Locale.Tr "repo.issues.delete_branch_at" (.OldRef|Escape) $createdStr}}
+ {{ctx.Locale.Tr "repo.issues.delete_branch_at" .OldRef $createdStr}}
</span>
</div>
{{else if eq .Type 12}}
@@ -418,7 +418,7 @@
{{.OriginalAuthor}}
</span>
<span class="text grey muted-links"> {{if $.Repository.OriginalURL}}</span>
- <span class="text migrate">({{ctx.Locale.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape)}}){{end}}</span>
+ <span class="text migrate">({{ctx.Locale.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname}}){{end}}</span>
{{else}}
{{template "shared/user/authorlink" .Poster}}
{{end}}
@@ -509,7 +509,7 @@
{{else}}
{{template "shared/user/authorlink" .Poster}}
{{end}}
- {{ctx.Locale.Tr "repo.pulls.change_target_branch_at" (.OldRef|Escape) (.NewRef|Escape) $createdStr}}
+ {{ctx.Locale.Tr "repo.pulls.change_target_branch_at" .OldRef .NewRef $createdStr}}
</span>
</div>
{{else if eq .Type 26}}
@@ -542,10 +542,10 @@
{{if eq .PosterID .AssigneeID}}
{{ctx.Locale.Tr "repo.issues.review.remove_review_request_self" $createdStr}}
{{else}}
- {{ctx.Locale.Tr "repo.issues.review.remove_review_request" (.Assignee.GetDisplayName|Escape) $createdStr}}
+ {{ctx.Locale.Tr "repo.issues.review.remove_review_request" .Assignee.GetDisplayName $createdStr}}
{{end}}
{{else}}
- {{ctx.Locale.Tr "repo.issues.review.add_review_request" (.Assignee.GetDisplayName|Escape) $createdStr}}
+ {{ctx.Locale.Tr "repo.issues.review.add_review_request" .Assignee.GetDisplayName $createdStr}}
{{end}}
{{else}}
<!-- If the assigned team is deleted, just displaying "Ghost Team" in the comment -->
@@ -554,9 +554,9 @@
{{$teamName = .AssigneeTeam.Name}}
{{end}}
{{if .RemovedAssignee}}
- {{ctx.Locale.Tr "repo.issues.review.remove_review_request" ($teamName|Escape) $createdStr}}
+ {{ctx.Locale.Tr "repo.issues.review.remove_review_request" $teamName $createdStr}}
{{else}}
- {{ctx.Locale.Tr "repo.issues.review.add_review_request" ($teamName|Escape) $createdStr}}
+ {{ctx.Locale.Tr "repo.issues.review.add_review_request" $teamName $createdStr}}
{{end}}
{{end}}
</span>
@@ -571,7 +571,7 @@
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{if .IsForcePush}}
- {{ctx.Locale.Tr "repo.issues.force_push_codes" ($.Issue.PullRequest.HeadBranch|Escape) (ShortSha .OldCommit) (($.Issue.Repo.CommitLink .OldCommit)|Escape) (ShortSha .NewCommit) (($.Issue.Repo.CommitLink .NewCommit)|Escape) $createdStr}}
+ {{ctx.Locale.Tr "repo.issues.force_push_codes" $.Issue.PullRequest.HeadBranch (ShortSha .OldCommit) ($.Issue.Repo.CommitLink .OldCommit) (ShortSha .NewCommit) ($.Issue.Repo.CommitLink .NewCommit) $createdStr}}
{{else}}
{{ctx.Locale.TrN (len .Commits) "repo.issues.push_commit_1" "repo.issues.push_commits_n" (len .Commits) $createdStr}}
{{end}}
@@ -663,11 +663,11 @@
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{if and .OldRef .NewRef}}
- {{ctx.Locale.Tr "repo.issues.change_ref_at" (.OldRef|Escape) (.NewRef|Escape) $createdStr}}
+ {{ctx.Locale.Tr "repo.issues.change_ref_at" .OldRef .NewRef $createdStr}}
{{else if .OldRef}}
- {{ctx.Locale.Tr "repo.issues.remove_ref_at" (.OldRef|Escape) $createdStr}}
+ {{ctx.Locale.Tr "repo.issues.remove_ref_at" .OldRef $createdStr}}
{{else}}
- {{ctx.Locale.Tr "repo.issues.add_ref_at" (.NewRef|Escape) $createdStr}}
+ {{ctx.Locale.Tr "repo.issues.add_ref_at" .NewRef $createdStr}}
{{end}}
</span>
</div>
diff --git a/templates/repo/issue/view_content/conversation.tmpl b/templates/repo/issue/view_content/conversation.tmpl
index 56f1af19b2..1bad0e9b55 100644
--- a/templates/repo/issue/view_content/conversation.tmpl
+++ b/templates/repo/issue/view_content/conversation.tmpl
@@ -73,7 +73,7 @@
{{else}}
{{template "shared/user/authorlink" .Poster}}
{{end}}
- {{ctx.Locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdSubStr}}
+ {{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdSubStr}}
</span>
</div>
<div class="comment-header-right actions gt-df gt-ac">
diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull.tmpl
index 371c9db6f0..c8e8038438 100644
--- a/templates/repo/issue/view_content/pull.tmpl
+++ b/templates/repo/issue/view_content/pull.tmpl
@@ -81,14 +81,14 @@
{{ctx.Locale.Tr "repo.pulls.data_broken"}}
</div>
{{else if .IsPullWorkInProgress}}
- <div class="item toggle-wip" data-title="{{.Issue.Title}}" data-wip-prefix="{{(.WorkInProgressPrefix|Escape)}}" data-update-url="{{.Issue.Link}}/title">
+ <div class="item toggle-wip" data-title="{{.Issue.Title}}" data-wip-prefix="{{.WorkInProgressPrefix}}" data-update-url="{{.Issue.Link}}/title">
<div class="item-section-left flex-text-inline gt-f1">
{{svg "octicon-x"}}
{{ctx.Locale.Tr "repo.pulls.cannot_merge_work_in_progress"}}
</div>
{{if or .HasIssuesOrPullsWritePermission .IsIssuePoster}}
<button class="ui compact button">
- {{ctx.Locale.Tr "repo.pulls.remove_prefix" (.WorkInProgressPrefix|Escape)}}
+ {{ctx.Locale.Tr "repo.pulls.remove_prefix" .WorkInProgressPrefix}}
</button>
{{end}}
</div>
diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl
index bb45b07421..f5b6751d6d 100644
--- a/templates/repo/issue/view_content/sidebar.tmpl
+++ b/templates/repo/issue/view_content/sidebar.tmpl
@@ -101,7 +101,7 @@
{{range .OriginalReviews}}
<div class="item gt-df gt-ac gt-py-3">
<div class="gt-df gt-ac gt-f1">
- <a class="muted" href="{{$.Repository.OriginalURL}}" data-tooltip-content="{{ctx.Locale.Tr "repo.migrated_from_fake" ($.Repository.GetOriginalURLHostname|Escape)}}">
+ <a class="muted" href="{{$.Repository.OriginalURL}}" data-tooltip-content="{{ctx.Locale.Tr "repo.migrated_from_fake" $.Repository.GetOriginalURLHostname}}">
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname) 20 "gt-mr-3"}}
{{.OriginalAuthor}}
</a>
@@ -114,9 +114,9 @@
</div>
</div>
{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .HasMerged) (not .Issue.IsClosed) (not .IsPullWorkInProgress)}}
- <div class="toggle-wip" data-title="{{.Issue.Title}}" data-wip-prefix="{{(index .PullRequestWorkInProgressPrefixes 0| Escape)}}" data-update-url="{{.Issue.Link}}/title">
+ <div class="toggle-wip" data-title="{{.Issue.Title}}" data-wip-prefix="{{index .PullRequestWorkInProgressPrefixes 0}}" data-update-url="{{.Issue.Link}}/title">
<a class="muted">
- {{ctx.Locale.Tr "repo.pulls.still_in_progress"}} {{ctx.Locale.Tr "repo.pulls.add_prefix" (index .PullRequestWorkInProgressPrefixes 0| Escape)}}
+ {{ctx.Locale.Tr "repo.pulls.still_in_progress"}} {{ctx.Locale.Tr "repo.pulls.add_prefix" (index .PullRequestWorkInProgressPrefixes 0)}}
</a>
</div>
{{end}}
@@ -300,7 +300,7 @@
{{else}}
{{if .HasUserStopwatch}}
<div class="ui warning message">
- {{ctx.Locale.Tr "repo.issues.tracking_already_started" (.OtherStopwatchURL|Escape)}}
+ {{ctx.Locale.Tr "repo.issues.tracking_already_started" .OtherStopwatchURL}}
</div>
{{end}}
<button class="ui fluid button issue-start-time" data-tooltip-content='{{ctx.Locale.Tr "repo.issues.start_tracking"}}'>
diff --git a/templates/repo/issue/view_title.tmpl b/templates/repo/issue/view_title.tmpl
index 37cad26c9b..e98e27924d 100644
--- a/templates/repo/issue/view_title.tmpl
+++ b/templates/repo/issue/view_title.tmpl
@@ -104,11 +104,11 @@
{{$createdStr:= TimeSinceUnix .Issue.CreatedUnix ctx.Locale}}
<span class="time-desc">
{{if .Issue.OriginalAuthor}}
- {{ctx.Locale.Tr "repo.issues.opened_by_fake" $createdStr (.Issue.OriginalAuthor|Escape)}}
+ {{ctx.Locale.Tr "repo.issues.opened_by_fake" $createdStr .Issue.OriginalAuthor}}
{{else if gt .Issue.Poster.ID 0}}
- {{ctx.Locale.Tr "repo.issues.opened_by" $createdStr (.Issue.Poster.HomeLink|Escape) (.Issue.Poster.GetDisplayName|Escape)}}
+ {{ctx.Locale.Tr "repo.issues.opened_by" $createdStr .Issue.Poster.HomeLink .Issue.Poster.GetDisplayName}}
{{else}}
- {{ctx.Locale.Tr "repo.issues.opened_by_fake" $createdStr (.Issue.Poster.GetDisplayName|Escape)}}
+ {{ctx.Locale.Tr "repo.issues.opened_by_fake" $createdStr .Issue.Poster.GetDisplayName}}
{{end}}
ยท
{{ctx.Locale.TrN .Issue.NumComments "repo.issues.num_comments_1" "repo.issues.num_comments" .Issue.NumComments}}
diff --git a/templates/repo/search.tmpl b/templates/repo/search.tmpl
index 495620300f..7b3ad7282e 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)}}
+ {{ctx.Locale.Tr "repo.search.results" .Keyword .RepoLink .RepoName}}
</h3>
{{if .SearchResults}}
<div class="flex-text-block gt-fw">
diff --git a/templates/repo/settings/protected_branch.tmpl b/templates/repo/settings/protected_branch.tmpl
index e57509abc0..6bbcc9f6ec 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)}}
+ {{ctx.Locale.Tr "repo.settings.branch_protection" .Rule.RuleName}}
</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/wiki/view.tmpl b/templates/repo/wiki/view.tmpl
index f3b6be97cf..9fa05b5b5c 100644
--- a/templates/repo/wiki/view.tmpl
+++ b/templates/repo/wiki/view.tmpl
@@ -107,7 +107,7 @@
{{ctx.Locale.Tr "repo.wiki.delete_page_button"}}
</div>
<div class="content">
- <p>{{ctx.Locale.Tr "repo.wiki.delete_page_notice_1" ($title|Escape)}}</p>
+ <p>{{ctx.Locale.Tr "repo.wiki.delete_page_notice_1" $title}}</p>
</div>
{{template "base/modal_actions_confirm" .}}
</div>