You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by di...@apache.org on 2022/06/30 20:45:55 UTC
[allura] 02/02: [#8442] added missing rel=nofollow attribute to links
This is an automated email from the ASF dual-hosted git repository.
dill0wn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git
commit 818a14c924f79815c287a3c981fbec6d212b6546
Author: Guillermo Cruz <gu...@slashdotmedia.com>
AuthorDate: Thu Jun 30 09:49:08 2022 -0600
[#8442] added missing rel=nofollow attribute to links
---
Allura/allura/templates/repo/commit.html | 2 +-
Allura/allura/templates/widgets/repo/log.html | 10 +++++-----
Allura/allura/templates/widgets/repo/revision.html | 14 +++++++-------
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/Allura/allura/templates/repo/commit.html b/Allura/allura/templates/repo/commit.html
index b00b9a7b5..f92483821 100644
--- a/Allura/allura/templates/repo/commit.html
+++ b/Allura/allura/templates/repo/commit.html
@@ -125,7 +125,7 @@ Commit <a href="{{commit.url()}}" rel="nofollow">{{commit.shorthand_id()}}</a> {
<td>{{ type }}
{% if type in ('copied', 'renamed') and file.ratio != 1 %}(with changes){% endif %}
</td>
- <td><a href="#diff-{{loop.index}}">
+ <td><a href="#diff-{{loop.index}}" rel="nofollow">
{% if type == 'copied' %}
{{ '%s -> %s' % (h.really_unicode(file.old), h.really_unicode(file.new)) }}
{% elif type == 'renamed' %}
diff --git a/Allura/allura/templates/widgets/repo/log.html b/Allura/allura/templates/widgets/repo/log.html
index 68c040d85..4ac51e3e3 100644
--- a/Allura/allura/templates/widgets/repo/log.html
+++ b/Allura/allura/templates/widgets/repo/log.html
@@ -39,11 +39,11 @@
{%if is_file %}
<div class="grid-1"><input type="checkbox" class="revision" revision="{{commit.id}}" url_commit="{{app.repo.url_for_commit(commit.id)}}"></div>
{% endif %}
- <a class="rev" href="{{app.repo.url_for_commit(commit.id)}}">{{app.repo.shorthand_for_commit(commit.id)}}</a>
+ <a class="rev" href="{{app.repo.url_for_commit(commit.id)}}" rel="nofollow">{{app.repo.shorthand_for_commit(commit.id)}}</a>
{% if commit.refs -%}
(
{%- for ref in commit.refs -%}
- <a class="ref" href="{{app.repo.url_for_commit(ref)}}">{{ref}}</a>{% if not loop.last %}, {% endif %}
+ <a class="ref" href="{{app.repo.url_for_commit(ref)}}" rel="nofollow">{{ref}}</a>{% if not loop.last %}, {% endif %}
{%- endfor -%}
)
{%- endif %}
@@ -58,7 +58,7 @@
{% if commit.rename_details %}
<div>
<b>renamed from</b>
- <a href={{commit.rename_details['commit_url']}}log/?path={{ commit.rename_details['path'] }}>
+ <a href={{commit.rename_details['commit_url']}}log/?path={{ commit.rename_details['path'] }} rel="nofollow">
{{ commit.rename_details['path'] }}
</a>
</div>
@@ -69,7 +69,7 @@
{% if commit.authored.date %}{{commit.authored.date|datetimeformat}}{% endif %}
</td>
<td style="text-align: left; vertical-align: text-top">
- <a class="browse" href="{{app.repo.url_for_commit(commit.id)}}tree{{path}}">
+ <a class="browse" href="{{app.repo.url_for_commit(commit.id)}}tree{{path}}" rel="nofollow">
{{ 'View' if is_file else 'Tree' }}
</a>
{%if is_file%}
@@ -85,6 +85,6 @@
</tbody>
</table>
{% if show_paging and next_commit %}
- <a class="page_list" href="{{app.repo.url_for_commit(next_commit.id)}}log{{tg.url(params=request.params)}}">Older ></a>
+ <a class="page_list" href="{{app.repo.url_for_commit(next_commit.id)}}log{{tg.url(params=request.params)}}" rel="nofollow">Older ></a>
{% endif %}
</div>
diff --git a/Allura/allura/templates/widgets/repo/revision.html b/Allura/allura/templates/widgets/repo/revision.html
index 309b332a7..2114b79ae 100644
--- a/Allura/allura/templates/widgets/repo/revision.html
+++ b/Allura/allura/templates/widgets/repo/revision.html
@@ -28,8 +28,8 @@
<p>
<label>Authored by:</label>
{% if value.author_url %}
- <a href="{{value.author_url}}">{{email_gravatar(value.authored.email, title=h.really_unicode(value.authored.name), size=16)}}</a>
- <a href="{{value.author_url}}">{{h.really_unicode(value.authored.name)}}</a>
+ <a href="{{value.author_url}}" rel="nofollow">{{email_gravatar(value.authored.email, title=h.really_unicode(value.authored.name), size=16)}}</a>
+ <a href="{{value.author_url}}" rel="nofollow">{{h.really_unicode(value.authored.name)}}</a>
{% else %}
{{email_gravatar(value.authored.email, title=h.really_unicode(value.authored.name), size=16)}} {{h.really_unicode(value.authored.name)}}
{% endif %}
@@ -41,8 +41,8 @@
<p>
<label>Committed by:</label>
{% if value.committer_url %}
- <a href="{{value.committer_url}}">{{email_gravatar(value.committed.email, title=h.really_unicode(value.committed.name), size=16)}}</a>
- <a href="{{value.committer_url}}">{{h.really_unicode(value.committed.name)}}</a>
+ <a href="{{value.committer_url}}" rel="nofollow">{{email_gravatar(value.committed.email, title=h.really_unicode(value.committed.name), size=16)}}</a>
+ <a href="{{value.committer_url}}" rel="nofollow">{{h.really_unicode(value.committed.name)}}</a>
{% else %}
{{email_gravatar(value.committed.email, title=h.really_unicode(value.committed.name), size=16)}} {{h.really_unicode(value.committed.name)}}
{% endif %}
@@ -52,18 +52,18 @@
</div>
<div class="commit-links">
- <a class="commit-tree-link" href="{{value.url()}}tree/">Browse code at this revision</a>
+ <a class="commit-tree-link" href="{{value.url()}}tree/" rel="nofollow">Browse code at this revision</a>
<div class="commit-ancestry">
{% if prev %}
<p class="commit-parents">
Parent{% if prev|length > 1 %}s{% endif %}:
- {% for ci in prev %}<a href="{{ci.url()}}">{{ci.shorthand_id()}}</a>{% endfor %}
+ {% for ci in prev %}<a href="{{ci.url()}}" rel="nofollow">{{ci.shorthand_id()}}</a>{% endfor %}
</p>
{% endif %}
{% if next %}
<p class="commit-children">
Child{% if next|length > 1 %}ren{% endif %}:
- {% for ci in next %}<a href="{{ci.url()}}">{{ci.shorthand_id()}}</a>{% endfor %}
+ {% for ci in next %}<a href="{{ci.url()}}" rel="nofollow">{{ci.shorthand_id()}}</a>{% endfor %}
</p>
{% endif %}
</div>