Skip to content
Snippets Groups Projects
Unverified Commit 5d7287c5 authored by Fredrik Jonsson's avatar Fredrik Jonsson Committed by GitHub
Browse files

Merge pull request #2047 from OpenTechFund/enhancement/add_rel_noopener_noreferrer_to_target_blank

Add rel noopener noreferrer to all none local links with target blank.
parents fa75d959 1c8c208a
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,7 @@
<h3>{% blocktrans %}Sorry this {{ page|verbose_name }} is not accepting applications at the moment{% endblocktrans %}</h3>
{% else%}
{% if page.get_parent.specific.guide_link %}
<a href="{{ page.get_parent.specific.guide_link }}" class="link link--fixed-apply" target="_blank">
<a href="{{ page.get_parent.specific.guide_link }}" class="link link--fixed-apply" target="_blank" rel="noopener noreferrer">
{% trans "Application guide" %}
</a>
{% endif %}
......
<a class="link link--download" href="{{ file.url }}" target="_blank">
<a class="link link--download" href="{{ file.url }}" target="_blank" rel="noopener noreferrer">
<div>
<svg><use xlink:href="#file"></use></svg>
<span>{{ file.filename }}</span>
......
......@@ -25,7 +25,7 @@
{% endif %}
{% if field.field.help_link %}
<p class="form__help-link"><a href="{{ field.field.help_link }}" target="_blank">See help guide for more information.<svg class="form__open-icon"><use xlink:href="#open-in-new-tab"></use></svg></a></p>
<p class="form__help-link"><a href="{{ field.field.help_link }}" target="_blank" rel="noopener noreferrer">See help guide for more information.<svg class="form__open-icon"><use xlink:href="#open-in-new-tab"></use></svg></a></p>
{% endif %}
<div class="form__item">
......
......@@ -3,6 +3,9 @@
'use strict';
// Make links on application forms open in a new window/tab.
$('.application-form').find('a').attr('target', '_blank');
$('.application-form').find('a').attr({
target: '_blank',
rel: 'noopener noreferrer'
});
})(jQuery);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment