Skip to content

Commit 762ad0c

Browse files
committed
adds: rel='nofollow' to all links generated by the application
1 parent 4a57c9e commit 762ad0c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+162
-162
lines changed

docs/layouts/doc/search.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<!-- this template is sucked in by search.js and appended to the search-results div above. So editing here will adjust style -->
2424
<script id="search-result-template" type="text/x-js-template">
2525
<div id="summary-${key}">
26-
<h4><a href="${link}">${title}</a></h4>
26+
<h4><a href="${link}" rel="nofollow">${title}</a></h4>
2727
<p>${snippet}</p>
2828
${ isset tags }<p>Tags: ${tags}</p>${ end }
2929
${ isset categories }<p>Categories: ${categories}</p>${ end }

modules/markup/common/footnote.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ func (r *FootnoteHTMLRenderer) renderFootnoteLink(w util.BufWriter, source []byt
421421
_, _ = w.Write(n.Name)
422422
_, _ = w.WriteString(`"><a href="#fn:`)
423423
_, _ = w.Write(n.Name)
424-
_, _ = w.WriteString(`" class="footnote-ref" role="doc-noteref">`)
424+
_, _ = w.WriteString(`" rel="nofollow" class="footnote-ref" role="doc-noteref">`)
425425
_, _ = w.WriteString(is)
426426
_, _ = w.WriteString(`</a></sup>`)
427427
}
@@ -434,7 +434,7 @@ func (r *FootnoteHTMLRenderer) renderFootnoteBackLink(w util.BufWriter, source [
434434
fmt.Fprintf(os.Stdout, "source:\n%s\n", string(n.Text(source)))
435435
_, _ = w.WriteString(` <a href="#fnref:`)
436436
_, _ = w.Write(n.Name)
437-
_, _ = w.WriteString(`" class="footnote-backref" role="doc-backlink">`)
437+
_, _ = w.WriteString(`" rel="nofollow" class="footnote-backref" role="doc-backlink">`)
438438
_, _ = w.WriteString("&#x21a9;&#xfe0e;")
439439
_, _ = w.WriteString(`</a>`)
440440
}

modules/markup/orgmode/orgmode.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ func (r *Writer) WriteRegularLink(l org.RegularLink) {
165165
videoSrc := getMediaURL(link)
166166
fmt.Fprintf(r, `<video src="%s" title="%s">%s</video>`, videoSrc, description, description)
167167
default:
168-
fmt.Fprintf(r, `<a href="%s" title="%s">%s</a>`, link, description, description)
168+
fmt.Fprintf(r, `<a href="%s" rel="nofollow" title="%s">%s</a>`, link, description, description)
169169
}
170170
}
171171

modules/repofiles/action.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ func UpdateIssuesCommit(doer *models.User, repo *models.Repository, commits []*r
175175
continue
176176
}
177177

178-
message := fmt.Sprintf(`<a href="%s/commit/%s">%s</a>`, repo.Link(), c.Sha1, html.EscapeString(strings.SplitN(c.Message, "\n", 2)[0]))
178+
message := fmt.Sprintf(`<a href="%s/commit/%s" rel="nofollow">%s</a>`, repo.Link(), c.Sha1, html.EscapeString(strings.SplitN(c.Message, "\n", 2)[0]))
179179
if err = models.CreateRefComment(doer, refRepo, refIssue, message, c.Sha1); err != nil {
180180
return err
181181
}

routers/web/feed/convert.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ func feedActionsToFeedItems(ctx *context.Context, actions []*models.Action) (ite
103103
if len(desc) != 0 {
104104
desc += "\n\n"
105105
}
106-
desc += fmt.Sprintf("<a href=\"%s\">%s</a>\n%s",
106+
desc += fmt.Sprintf("<a href=\"%s\" rel=\"nofollow\">%s</a>\n%s",
107107
fmt.Sprintf("%s/commit/%s", act.GetRepoLink(), commit.Sha1),
108108
commit.Sha1,
109109
templates.RenderCommitMessage(commit.Message, repoLink, nil),

services/webhook/general.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func noneLinkFormatter(url string, text string) string {
2222

2323
// htmlLinkFormatter creates a HTML link
2424
func htmlLinkFormatter(url string, text string) string {
25-
return fmt.Sprintf(`<a href="%s">%s</a>`, url, html.EscapeString(text))
25+
return fmt.Sprintf(`<a href="%s" rel="nofollow">%s</a>`, url, html.EscapeString(text))
2626
}
2727

2828
func getIssuesPayloadInfo(p *api.IssuePayload, linkFormatter linkFormatter, withSender bool) (string, string, string, int) {

services/webhook/matrix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func (m *MatrixPayloadUnsafe) JSONPayload() ([]byte, error) {
8686

8787
// MatrixLinkFormatter creates a link compatible with Matrix
8888
func MatrixLinkFormatter(url string, text string) string {
89-
return fmt.Sprintf(`<a href="%s">%s</a>`, html.EscapeString(url), html.EscapeString(text))
89+
return fmt.Sprintf(`<a href="%s" rel="nofollow">%s</a>`, html.EscapeString(url), html.EscapeString(text))
9090
}
9191

9292
// MatrixLinkToRef Matrix-formatter link to a repo ref

services/webhook/telegram.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func (t *TelegramPayload) JSONPayload() ([]byte, error) {
6060
func (t *TelegramPayload) Create(p *api.CreatePayload) (api.Payloader, error) {
6161
// created tag/branch
6262
refName := git.RefEndName(p.Ref)
63-
title := fmt.Sprintf(`[<a href="%s">%s</a>] %s <a href="%s">%s</a> created`, p.Repo.HTMLURL, p.Repo.FullName, p.RefType,
63+
title := fmt.Sprintf(`[<a href="%s" rel="nofollow">%s</a>] %s <a href="%s" rel="nofollow">%s</a> created`, p.Repo.HTMLURL, p.Repo.FullName, p.RefType,
6464
p.Repo.HTMLURL+"/src/"+refName, refName)
6565

6666
return createTelegramPayload(title), nil
@@ -70,15 +70,15 @@ func (t *TelegramPayload) Create(p *api.CreatePayload) (api.Payloader, error) {
7070
func (t *TelegramPayload) Delete(p *api.DeletePayload) (api.Payloader, error) {
7171
// created tag/branch
7272
refName := git.RefEndName(p.Ref)
73-
title := fmt.Sprintf(`[<a href="%s">%s</a>] %s <a href="%s">%s</a> deleted`, p.Repo.HTMLURL, p.Repo.FullName, p.RefType,
73+
title := fmt.Sprintf(`[<a href="%s" rel="nofollow">%s</a>] %s <a href="%s" rel="nofollow">%s</a> deleted`, p.Repo.HTMLURL, p.Repo.FullName, p.RefType,
7474
p.Repo.HTMLURL+"/src/"+refName, refName)
7575

7676
return createTelegramPayload(title), nil
7777
}
7878

7979
// Fork implements PayloadConvertor Fork method
8080
func (t *TelegramPayload) Fork(p *api.ForkPayload) (api.Payloader, error) {
81-
title := fmt.Sprintf(`%s is forked to <a href="%s">%s</a>`, p.Forkee.FullName, p.Repo.HTMLURL, p.Repo.FullName)
81+
title := fmt.Sprintf(`%s is forked to <a href="%s" rel="nofollow">%s</a>`, p.Forkee.FullName, p.Repo.HTMLURL, p.Repo.FullName)
8282

8383
return createTelegramPayload(title), nil
8484
}
@@ -101,7 +101,7 @@ func (t *TelegramPayload) Push(p *api.PushPayload) (api.Payloader, error) {
101101
if titleLink == "" {
102102
titleLink = p.Repo.HTMLURL + "/src/" + branchName
103103
}
104-
title := fmt.Sprintf(`[<a href="%s">%s</a>:<a href="%s">%s</a>] %s`, p.Repo.HTMLURL, p.Repo.FullName, titleLink, branchName, commitDesc)
104+
title := fmt.Sprintf(`[<a href="%s" rel="nofollow">%s</a>:<a href="%s" rel="nofollow">%s</a>] %s`, p.Repo.HTMLURL, p.Repo.FullName, titleLink, branchName, commitDesc)
105105

106106
var text string
107107
// for each commit, generate attachment text
@@ -110,7 +110,7 @@ func (t *TelegramPayload) Push(p *api.PushPayload) (api.Payloader, error) {
110110
if commit.Author != nil {
111111
authorName = " - " + commit.Author.Name
112112
}
113-
text += fmt.Sprintf(`[<a href="%s">%s</a>] %s`, commit.URL, commit.ID[:7],
113+
text += fmt.Sprintf(`[<a href="%s" rel="nofollow">%s</a>] %s`, commit.URL, commit.ID[:7],
114114
strings.TrimRight(commit.Message, "\r\n")) + authorName
115115
// add linebreak to each commit but the last
116116
if i < len(p.Commits)-1 {
@@ -164,7 +164,7 @@ func (t *TelegramPayload) Repository(p *api.RepositoryPayload) (api.Payloader, e
164164
var title string
165165
switch p.Action {
166166
case api.HookRepoCreated:
167-
title = fmt.Sprintf(`[<a href="%s">%s</a>] Repository created`, p.Repository.HTMLURL, p.Repository.FullName)
167+
title = fmt.Sprintf(`[<a href="%s" rel="nofollow">%s</a>] Repository created`, p.Repository.HTMLURL, p.Repository.FullName)
168168
return createTelegramPayload(title), nil
169169
case api.HookRepoDeleted:
170170
title = fmt.Sprintf("[%s] Repository deleted", p.Repository.FullName)

templates/admin/auth/list.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
{{range .Sources}}
2727
<tr>
2828
<td>{{.ID}}</td>
29-
<td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}">{{.Name}}</a></td>
29+
<td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}" rel="nofollow">{{.Name}}</a></td>
3030
<td>{{.TypeName}}</td>
3131
<td>{{if .IsActive}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>
3232
<td><span class="poping up" data-content="{{.UpdatedUnix.FormatShort}}" data-variation="tiny">{{.UpdatedUnix.FormatShort}}</span></td>
3333
<td><span class="poping up" data-content="{{.CreatedUnix.FormatLong}}" data-variation="tiny">{{.CreatedUnix.FormatShort}}</span></td>
34-
<td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}">{{svg "octicon-pencil"}}</a></td>
34+
<td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}" rel="nofollow">{{svg "octicon-pencil"}}</a></td>
3535
</tr>
3636
{{end}}
3737
</tbody>

templates/admin/dashboard.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{{template "base/alert" .}}
66
{{if .NeedUpdate}}
77
<div class="ui negative message flash-error">
8-
<p>"Gitea {{.RemoteVersion | Str2html}} is now available, you are running {{.AppVer | Str2html}}. Check the <a href="https://blog.gitea.io">blog</a> for more details.</p>
8+
<p>"Gitea {{.RemoteVersion | Str2html}} is now available, you are running {{.AppVer | Str2html}}. Check the <a href="https://blog.gitea.io" rel="nofollow">blog</a> for more details.</p>
99
</div>
1010
{{end}}
1111
<h4 class="ui top attached header">

templates/admin/emails/list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<tbody>
5050
{{range .Emails}}
5151
<tr>
52-
<td><a href="{{AppSubUrl}}/{{.Name}}">{{.Name}}</a></td>
52+
<td><a href="{{AppSubUrl}}/{{.Name}}" rel="nofollow">{{.Name}}</a></td>
5353
<td><span class="text truncate">{{.FullName}}</span></td>
5454
<td><span class="text email">{{.Email}}</span></td>
5555
<td>{{if .IsPrimary}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>

templates/admin/monitor.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
<td>{{.Type}}</td>
5959
<td>{{.ExemplarType}}</td>
6060
<td>{{$sum := .NumberOfWorkers}}{{if lt $sum 0}}-{{else}}{{$sum}}{{end}}</td>
61-
<td><a href="{{$.Link}}/queue/{{.QID}}" class="button">{{if lt $sum 0}}{{$.i18n.Tr "admin.monitor.queue.review"}}{{else}}{{$.i18n.Tr "admin.monitor.queue.review_add"}}{{end}}</a>
61+
<td><a href="{{$.Link}}/queue/{{.QID}}" rel="nofollow" class="button">{{if lt $sum 0}}{{$.i18n.Tr "admin.monitor.queue.review"}}{{else}}{{$.i18n.Tr "admin.monitor.queue.review_add"}}{{end}}</a>
6262
</tr>
6363
{{end}}
6464
</tbody>

templates/admin/notice.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<td>{{$.i18n.Tr .TrStr}}</td>
3131
<td class="view-detail"><span class="notice-description text truncate">{{.Description}}</span></td>
3232
<td><span class="notice-created-time poping up" data-content="{{.CreatedUnix.AsTime}}" data-variation="inverted tiny">{{.CreatedUnix.FormatShort}}</span></td>
33-
<td><a href="#">{{svg "octicon-note" 16 "view-detail"}}</a></td>
33+
<td><a href="#" rel="nofollow">{{svg "octicon-note" 16 "view-detail"}}</a></td>
3434
</tr>
3535
{{end}}
3636
</tbody>

templates/admin/org/list.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<tr>
3737
<td>{{.ID}}</td>
3838
<td>
39-
<a href="{{.HomeLink}}">{{.Name}}</a>
39+
<a href="{{.HomeLink}}" rel="nofollow">{{.Name}}</a>
4040
{{if .Visibility.IsPrivate}}
4141
<span class="text gold">{{svg "octicon-lock"}}</span>
4242
{{end}}
@@ -45,7 +45,7 @@
4545
<td>{{.NumMembers}}</td>
4646
<td>{{.NumRepos}}</td>
4747
<td><span title="{{.CreatedUnix.FormatLong}}">{{.CreatedUnix.FormatShort}}</span></td>
48-
<td><a href="{{.OrganisationLink}}/settings">{{svg "octicon-pencil"}}</a></td>
48+
<td><a href="{{.OrganisationLink}}/settings" rel="nofollow">{{svg "octicon-pencil"}}</a></td>
4949
</tr>
5050
{{end}}
5151
</tbody>

templates/admin/repo/list.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@
4545
<tr>
4646
<td>{{.ID}}</td>
4747
<td>
48-
<a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
48+
<a href="{{AppSubUrl}}/{{.Owner.Name}}" rel="nofollow">{{.Owner.Name}}</a>
4949
{{if .Owner.Visibility.IsPrivate}}
5050
<span class="text gold">{{svg "octicon-lock"}}</span>
5151
{{end}}
5252
</td>
5353
<td>
54-
<a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}">{{.Name}}</a>
54+
<a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}" rel="nofollow">{{.Name}}</a>
5555
{{if .IsArchived}}
5656
<span class="ui basic mini label">{{$.i18n.Tr "repo.desc.archived"}}</span>
5757
{{end}}

templates/admin/user/list.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
{{range .Users}}
8888
<tr>
8989
<td>{{.ID}}</td>
90-
<td><a href="{{AppSubUrl}}/{{.Name}}">{{.Name}}</a></td>
90+
<td><a href="{{AppSubUrl}}/{{.Name}}" rel="nofollow">{{.Name}}</a></td>
9191
<td><span class="text truncate email">{{.Email}}</span></td>
9292
<td>{{if .IsActive}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>
9393
<td>{{if .IsAdmin}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>
@@ -100,7 +100,7 @@
100100
{{else}}
101101
<td><span>{{$.i18n.Tr "admin.users.never_login"}}</span></td>
102102
{{end}}
103-
<td><a href="{{$.Link}}/{{.ID}}">{{svg "octicon-pencil"}}</a></td>
103+
<td><a href="{{$.Link}}/{{.ID}}" rel="nofollow">{{svg "octicon-pencil"}}</a></td>
104104
</tr>
105105
{{end}}
106106
</tbody>

templates/base/footer_content.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
{{end}}
1717
</div>
1818
</div>
19-
<a href="{{AssetUrlPrefix}}/js/licenses.txt">{{.i18n.Tr "licenses"}}</a>
20-
{{if .EnableSwagger}}<a href="{{AppSubUrl}}/api/swagger">API</a>{{end}}
19+
<a href="{{AssetUrlPrefix}}/js/licenses.txt" rel="nofollow">{{.i18n.Tr "licenses"}}</a>
20+
{{if .EnableSwagger}}<a href="{{AppSubUrl}}/api/swagger" rel="nofollow">API</a>{{end}}
2121
<a target="_blank" rel="noopener noreferrer" href="https://gitea.io">{{.i18n.Tr "website"}}</a>
2222
{{template "custom/extra_links_footer" .}}
2323
{{if (or .ShowFooterVersion .PageIsAdmin)}}<span class="version">{{GoVer}}</span>{{end}}

templates/base/head_navbar.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="ui container" id="navbar">
22
<div class="item brand" style="justify-content: space-between;">
3-
<a href="{{AppSubUrl}}/" data-content="{{if .IsSigned}}{{.i18n.Tr "dashboard"}}{{else}}{{.i18n.Tr "home"}}{{end}}" data-variation="tiny inverted">
3+
<a href="{{AppSubUrl}}/" data-content="{{if .IsSigned}}{{.i18n.Tr "dashboard"}}{{else}}{{.i18n.Tr "home"}}{{end}}" data-variation="tiny inverted" rel="nofollow">
44
<img class="ui mini image" width="30" height="30" src="{{AssetUrlPrefix}}/img/logo.svg">
55
</a>
66
<div class="ui basic icon button mobile-only" id="navbar-expand-toggle">
@@ -101,7 +101,7 @@
101101
</div>
102102
</div>
103103

104-
<a href="{{AppSubUrl}}/notifications" class="item poping up" data-content='{{.i18n.Tr "notifications"}}' data-variation="tiny inverted">
104+
<a href="{{AppSubUrl}}/notifications" class="item poping up" data-content='{{.i18n.Tr "notifications"}}' data-variation="tiny inverted" rel="nofollow">
105105
<span class="text">
106106
<span class="fitted">{{svg "octicon-bell"}}</span>
107107
<span class="sr-mobile-only">{{.i18n.Tr "notifications"}}</span>

templates/explore/code.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<tr>
4848
<td class="lines-num">
4949
{{range .LineNumbers}}
50-
<a href="{{EscapePound $repo.HTMLURL}}/src/commit/{{$result.CommitID}}/{{EscapePound $result.Filename}}#L{{.}}"><span>{{.}}</span></a>
50+
<a href="{{EscapePound $repo.HTMLURL}}/src/commit/{{$result.CommitID}}/{{EscapePound $result.Filename}}#L{{.}}" rel="nofollow"><span>{{.}}</span></a>
5151
{{end}}
5252
</td>
5353
<td class="lines-code chroma"><code class="code-inner">{{.FormattedLines | Safe}}</code></td>

templates/explore/organizations.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
{{end}}
2222
{{if and .Website}}
2323
{{svg "octicon-link"}}
24-
<a href="{{.Website}}" rel="nofollow">{{.Website}}</a>
24+
<a href="{{.Website}}">{{.Website}}</a>
2525
{{end}}
2626
{{svg "octicon-clock"}} {{$.i18n.Tr "user.join_on"}} {{.CreatedUnix.FormatShort}}
2727
</div>

templates/explore/repo_list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
{{if .Topics }}
5454
<div class="ui tags">
5555
{{range .Topics}}
56-
{{if ne . "" }}<a href="{{AppSubUrl}}/explore/repos?q={{.}}&topic=1"><div class="ui small label topic">{{.}}</div></a>{{end}}
56+
{{if ne . "" }}<a href="{{AppSubUrl}}/explore/repos?q={{.}}&topic=1"><div class="ui small label topic" rel="nofollow">{{.}}</div></a>{{end}}
5757
{{end}}
5858
</div>
5959
{{end}}

templates/mail/auth/reset_passwd.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{{ $recover_url := printf "%suser/recover_account?code=%s" AppUrl .Code}}
99
<body>
1010
<p>{{.i18n.Tr "mail.hi_user_x" .DisplayName | Str2html}}</p><br>
11-
<p>{{.i18n.Tr "mail.reset_password.text" .ResetPwdCodeLives | Str2html}}</p><p><a href="{{$recover_url}}">{{$recover_url}}</a></p><br>
11+
<p>{{.i18n.Tr "mail.reset_password.text" .ResetPwdCodeLives | Str2html}}</p><p><a href="{{$recover_url}}" rel="nofollow">{{$recover_url}}</a></p><br>
1212
<p>{{.i18n.Tr "mail.link_not_working_do_paste"}}</p>
1313

1414
<p>© <a target="_blank" rel="noopener noreferrer" href="{{AppUrl}}">{{AppName}}</a></p>

templates/mail/notify/collaborator.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<p>
1515
---
1616
<br>
17-
<a href="{{.Link}}">{{.i18n.Tr "mail.view_it_on" AppName}}</a>.
17+
<a href="{{.Link}}" rel="nofollow">{{.i18n.Tr "mail.view_it_on" AppName}}</a>.
1818
</p>
1919
</div>
2020
</body>

templates/mail/release.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
</head>
1313

14-
{{$release_url := printf "<a href='%s'>%s</a>" .Release.HTMLURL .Release.TagName}}
14+
{{$release_url := printf "<a href='%s' rel="nofollow">%s</a>" .Release.HTMLURL .Release.TagName}}
1515
{{$repo_url := printf "<a href='%s'>%s</a>" .Release.Repo.HTMLURL .Release.Repo.FullName}}
1616
<body>
1717
<p>

templates/org/team/members.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
data-data-team-name="{{$.Team.Name}}">{{$.i18n.Tr "org.members.remove"}}</button>
3535
</form>
3636
{{end}}
37-
<a href="{{.HomeLink}}">
37+
<a href="{{.HomeLink}}" rel="nofollow">
3838
{{avatar .}}
3939
{{.DisplayName}}
4040
</a>

templates/post-install.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</div>
1414
<div class="ui stackable middle very relaxed page grid">
1515
<div class="sixteen wide center aligned centered column">
16-
<p><a href="{{AppUrl}}user/login">{{AppUrl}}user/login</a></p>
16+
<p><a href="{{AppUrl}}user/login" rel="nofollow">{{AppUrl}}user/login</a></p>
1717
</div>
1818
</div>
1919
</div>

templates/repo/activity.tmpl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
<div class="column">
3434
{{if gt .Activity.ActivePRCount 0}}
3535
<div class="stats-table">
36-
<a href="#merged-pull-requests" class="table-cell tiny background purple" style="width: {{.Activity.MergedPRPerc}}{{if ne .Activity.MergedPRPerc 0}}%{{end}}"></a>
37-
<a href="#proposed-pull-requests" class="table-cell tiny background green"></a>
36+
<a href="#merged-pull-requests" class="table-cell tiny background purple" style="width: {{.Activity.MergedPRPerc}}{{if ne .Activity.MergedPRPerc 0}}%{{end}}" rel="nofollow"></a>
37+
<a href="#proposed-pull-requests" class="table-cell tiny background green" rel="nofollow"></a>
3838
</div>
3939
{{else}}
4040
<div class="stats-table">
@@ -48,8 +48,8 @@
4848
<div class="column">
4949
{{if gt .Activity.ActiveIssueCount 0}}
5050
<div class="stats-table">
51-
<a href="#closed-issues" class="table-cell tiny background red" style="width: {{.Activity.ClosedIssuePerc}}{{if ne .Activity.ClosedIssuePerc 0}}%{{end}}"></a>
52-
<a href="#new-issues" class="table-cell tiny background green"></a>
51+
<a href="#closed-issues" class="table-cell tiny background red" style="width: {{.Activity.ClosedIssuePerc}}{{if ne .Activity.ClosedIssuePerc 0}}%{{end}}" rel="nofollow"></a>
52+
<a href="#new-issues" class="table-cell tiny background green" rel="nofollow"></a>
5353
</div>
5454
{{else}}
5555
<div class="stats-table">
@@ -62,21 +62,21 @@
6262
</div>
6363
<div class="ui attached segment horizontal segments">
6464
{{if .Permission.CanRead $.UnitTypePullRequests}}
65-
<a href="#merged-pull-requests" class="ui attached segment text center">
65+
<a href="#merged-pull-requests" class="ui attached segment text center" rel="nofollow">
6666
<span class="text purple">{{svg "octicon-git-pull-request"}}</span> <strong>{{.Activity.MergedPRCount}}</strong><br>
6767
{{.i18n.Tr (TrN .i18n.Lang .Activity.MergedPRCount "repo.activity.merged_prs_count_1" "repo.activity.merged_prs_count_n") }}
6868
</a>
69-
<a href="#proposed-pull-requests" class="ui attached segment text center">
69+
<a href="#proposed-pull-requests" class="ui attached segment text center" rel="nofollow">
7070
<span class="text green">{{svg "octicon-git-branch"}}</span> <strong>{{.Activity.OpenedPRCount}}</strong><br>
7171
{{.i18n.Tr (TrN .i18n.Lang .Activity.OpenedPRCount "repo.activity.opened_prs_count_1" "repo.activity.opened_prs_count_n") }}
7272
</a>
7373
{{end}}
7474
{{if .Permission.CanRead $.UnitTypeIssues}}
75-
<a href="#closed-issues" class="ui attached segment text center">
75+
<a href="#closed-issues" class="ui attached segment text center" rel="nofollow">
7676
<span class="text red">{{svg "octicon-issue-closed"}}</span> <strong>{{.Activity.ClosedIssueCount}}</strong><br>
7777
{{.i18n.Tr (TrN .i18n.Lang .Activity.ClosedIssueCount "repo.activity.closed_issues_count_1" "repo.activity.closed_issues_count_n") }}
7878
</a>
79-
<a href="#new-issues" class="ui attached segment text center">
79+
<a href="#new-issues" class="ui attached segment text center" rel="nofollow">
8080
<span class="text green">{{svg "octicon-issue-opened"}}</span> <strong>{{.Activity.OpenedIssueCount}}</strong><br>
8181
{{.i18n.Tr (TrN .i18n.Lang .Activity.OpenedIssueCount "repo.activity.new_issues_count_1" "repo.activity.new_issues_count_n") }}
8282
</a>

0 commit comments

Comments
 (0)