diff --git a/services/auth/source/oauth2/providers.go b/services/auth/source/oauth2/providers.go index ac3264783..c3edae4ab 100644 --- a/services/auth/source/oauth2/providers.go +++ b/services/auth/source/oauth2/providers.go @@ -59,7 +59,7 @@ func (p *AuthSourceProvider) DisplayName() string { func (p *AuthSourceProvider) IconHTML(size int) template.HTML { if p.iconURL != "" { - img := fmt.Sprintf(`%s`, + img := fmt.Sprintf(`%s`, size, size, html.EscapeString(p.iconURL), html.EscapeString(p.DisplayName()), diff --git a/templates/repo/commit_statuses.tmpl b/templates/repo/commit_statuses.tmpl index 74c20a6a2..b035e74c2 100644 --- a/templates/repo/commit_statuses.tmpl +++ b/templates/repo/commit_statuses.tmpl @@ -1,6 +1,6 @@ {{if .Statuses}} {{if and (eq (len .Statuses) 1) .Status.TargetURL}} - + {{template "repo/commit_status" .Status}} {{else}} diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index bc2fd48e6..37ec98a3d 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -80,7 +80,7 @@ {{else if eq .Type 1}}
- {{svg "octicon-dot-fill"}} + {{svg "octicon-dot-fill"}} {{if not .OriginalAuthor}} {{template "shared/user/avatarlink" dict "user" .Poster}} {{end}} @@ -95,7 +95,7 @@
{{else if eq .Type 2}}
- {{svg "octicon-circle-slash"}} + {{svg "octicon-circle-slash"}} {{if not .OriginalAuthor}} {{template "shared/user/avatarlink" dict "user" .Poster}} {{end}} @@ -110,7 +110,7 @@
{{else if eq .Type 28}}
- {{svg "octicon-git-merge"}} + {{svg "octicon-git-merge"}} {{if not .OriginalAuthor}} {{template "shared/user/avatarlink" dict "user" .Poster}} {{end}} @@ -383,7 +383,7 @@ {{ctx.AvatarUtils.Avatar .Poster 40}} {{end}} - {{svg (printf "octicon-%s" .Review.Type.Icon)}} + {{svg (printf "octicon-%s" .Review.Type.Icon)}} {{template "repo/issue/view_content/comments_authorlink" dict "ctxData" $ "comment" .}} {{if eq .Review.Type 1}} diff --git a/templates/repo/pulse.tmpl b/templates/repo/pulse.tmpl index e6a59ea8c..5943ae043 100644 --- a/templates/repo/pulse.tmpl +++ b/templates/repo/pulse.tmpl @@ -108,7 +108,7 @@ {{end}} {{if gt .Activity.PublishedReleaseCount 0}} -

+

{{svg "octicon-tag" 16 "gt-mr-3"}} {{ctx.Locale.Tr "repo.activity.title.releases_published_by" (ctx.Locale.TrN .Activity.PublishedReleaseCount "repo.activity.title.releases_1" "repo.activity.title.releases_n" .Activity.PublishedReleaseCount) @@ -130,7 +130,7 @@ {{end}} {{if gt .Activity.MergedPRCount 0}} -

+

{{svg "octicon-git-pull-request" 16 "gt-mr-3"}} {{ctx.Locale.Tr "repo.activity.title.prs_merged_by" (ctx.Locale.TrN .Activity.MergedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n" .Activity.MergedPRCount) @@ -149,7 +149,7 @@ {{end}} {{if gt .Activity.OpenedPRCount 0}} -

+

{{svg "octicon-git-branch" 16 "gt-mr-3"}} {{ctx.Locale.Tr "repo.activity.title.prs_opened_by" (ctx.Locale.TrN .Activity.OpenedPRCount "repo.activity.title.prs_1" "repo.activity.title.prs_n" .Activity.OpenedPRCount) @@ -168,7 +168,7 @@ {{end}} {{if gt .Activity.ClosedIssueCount 0}} -

+

{{svg "octicon-issue-closed" 16 "gt-mr-3"}} {{ctx.Locale.Tr "repo.activity.title.issues_closed_from" (ctx.Locale.TrN .Activity.ClosedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n" .Activity.ClosedIssueCount) @@ -187,7 +187,7 @@ {{end}} {{if gt .Activity.OpenedIssueCount 0}} -

+

{{svg "octicon-issue-opened" 16 "gt-mr-3"}} {{ctx.Locale.Tr "repo.activity.title.issues_created_by" (ctx.Locale.TrN .Activity.OpenedIssueCount "repo.activity.title.issues_1" "repo.activity.title.issues_n" .Activity.OpenedIssueCount) @@ -206,7 +206,7 @@ {{end}} {{if gt .Activity.UnresolvedIssueCount 0}} -

+

{{svg "octicon-comment-discussion" 16 "gt-mr-3"}} {{ctx.Locale.TrN .Activity.UnresolvedIssueCount "repo.activity.title.unresolved_conv_1" "repo.activity.title.unresolved_conv_n" .Activity.UnresolvedIssueCount}}

diff --git a/templates/shared/issuelist.tmpl b/templates/shared/issuelist.tmpl index e8a0079c1..a90188297 100644 --- a/templates/shared/issuelist.tmpl +++ b/templates/shared/issuelist.tmpl @@ -13,7 +13,7 @@
- {{RenderEmoji $.Context .Title | RenderCodeBlock}} + {{RenderEmoji $.Context .Title | RenderCodeBlock}} {{if .IsPull}} {{if (index $.CommitStatuses .PullRequest.ID)}} {{template "repo/commit_statuses" dict "Status" (index $.CommitLastStatus .PullRequest.ID) "Statuses" (index $.CommitStatuses .PullRequest.ID)}} @@ -36,7 +36,7 @@ {{if .Assignees}}
{{range .Assignees}} - + {{ctx.AvatarUtils.Avatar . 20}} {{end}} @@ -44,7 +44,7 @@ {{end}} {{if .NumComments}} diff --git a/templates/user/dashboard/issues.tmpl b/templates/user/dashboard/issues.tmpl index fd5960c31..7b7023cfa 100644 --- a/templates/user/dashboard/issues.tmpl +++ b/templates/user/dashboard/issues.tmpl @@ -4,7 +4,7 @@
-