Skip to content

Commit 76b7471

Browse files
committed
Add noreferrer to all noopener exteranl links
1 parent 05fd331 commit 76b7471

File tree

10 files changed

+34
-34
lines changed

10 files changed

+34
-34
lines changed

app/views/community_news/show.html.erb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<% end %>
1919

2020
<% if @community_news.external_url.present? %>
21-
<%= link_to "Website", safe_url(@community_news.external_url), target: "_blank", rel: "noopener",
21+
<%= link_to "Website", safe_url(@community_news.external_url), target: "_blank", rel: "noopener noreferrer",
2222
class: "btn btn-secondary-outline" %>
2323
<% end %>
2424
</div>
@@ -75,28 +75,28 @@
7575

7676
<!-- Facebook -->
7777
<%= link_to "https://www.facebook.com/sharer/sharer.php?u=#{community_news_url}",
78-
target: "_blank", rel: "noopener",
78+
target: "_blank", rel: "noopener noreferrer",
7979
class: "text-blue-600 hover:text-blue-800" do %>
8080
<i class="fab fa-facebook-square fa-lg"></i>
8181
<% end %>
8282

8383
<!-- X / Twitter -->
8484
<%= link_to "https://twitter.com/intent/tweet?url=#{community_news_url}&text=#{community_news_title}",
85-
target: "_blank", rel: "noopener",
85+
target: "_blank", rel: "noopener noreferrer",
8686
class: "text-sky-500 hover:text-sky-700" do %>
8787
<i class="fab fa-x-twitter fa-lg"></i>
8888
<% end %>
8989

9090
<!-- LinkedIn -->
9191
<%= link_to "https://www.linkedin.com/sharing/share-offsite/?url=#{community_news_url}",
92-
target: "_blank", rel: "noopener",
92+
target: "_blank", rel: "noopener noreferrer",
9393
class: "text-blue-700 hover:text-blue-900" do %>
9494
<i class="fab fa-linkedin fa-lg"></i>
9595
<% end %>
9696

9797
<!-- Pinterest -->
9898
<%= link_to "https://pinterest.com/pin/create/button/?url=#{community_news_url}&description=#{community_news_title}",
99-
target: "_blank", rel: "noopener",
99+
target: "_blank", rel: "noopener noreferrer",
100100
class: "text-red-600 hover:text-red-800" do %>
101101
<i class="fab fa-pinterest-square fa-lg"></i>
102102
<% end %>

app/views/contact_us/index.html.erb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@
3939

4040
<!-- LinkedIn -->
4141
<%= link_to "https://www.linkedin.com/company/a-window-between-worlds",
42-
target: "_blank", rel: "noopener",
42+
target: "_blank", rel: "noopener noreferrer",
4343
class: "group inline-flex items-center justify-center w-10 h-10
4444
rounded-md bg-gray-100 hover:bg-[#0A66C2] transition-colors duration-200" do %>
4545
<i class="fab fa-linkedin-in text-gray-600 group-hover:text-white text-lg inline-block"></i>
4646
<% end %>
4747

4848
<!-- Instagram -->
4949
<%= link_to "https://www.instagram.com/awbworg",
50-
target: "_blank", rel: "noopener",
50+
target: "_blank", rel: "noopener noreferrer",
5151
class: "group inline-flex items-center justify-center w-10 h-10
5252
rounded-md bg-gray-100 hover:bg-gradient-to-tr hover:from-[#F58529]
5353
hover:via-[#DD2A7B] hover:to-[#8134AF] transition-all duration-300" do %>
@@ -56,23 +56,23 @@
5656

5757
<!-- Facebook -->
5858
<%= link_to "https://www.facebook.com/awbworg",
59-
target: "_blank", rel: "noopener",
59+
target: "_blank", rel: "noopener noreferrer",
6060
class: "group inline-flex items-center justify-center w-10 h-10
6161
rounded-md bg-gray-100 hover:bg-[#1877F2] transition-colors duration-200" do %>
6262
<i class="fab fa-facebook-f text-gray-600 group-hover:text-white text-lg inline-block"></i>
6363
<% end %>
6464

6565
<!-- Twitter -->
6666
<%= link_to "https://www.twitter.com/awbworg",
67-
target: "_blank", rel: "noopener",
67+
target: "_blank", rel: "noopener noreferrer",
6868
class: "group inline-flex items-center justify-center w-10 h-10
6969
rounded-md bg-gray-100 hover:bg-[#1DA1F2] transition-colors duration-200" do %>
7070
<i class="fab fa-twitter text-gray-600 group-hover:text-white text-lg inline-block"></i>
7171
<% end %>
7272

7373
<!-- YouTube -->
7474
<%= link_to "https://www.youtube.com/@awbworg",
75-
target: "_blank", rel: "noopener",
75+
target: "_blank", rel: "noopener noreferrer",
7676
class: "group inline-flex items-center justify-center w-10 h-10
7777
rounded-md bg-gray-100 hover:bg-[#FF0000]
7878
text-gray-600 hover:text-white

app/views/facilitators/_social_media_buttons.html.erb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<div class="flex flex-wrap items-center justify-center md:justify-start gap-1">
55
<% if facilitator.linked_in_url.present? %>
6-
<%= link_to facilitator.linked_in_url, target: "_blank", rel: "noopener",
6+
<%= link_to facilitator.linked_in_url, target: "_blank", rel: "noopener noreferrer",
77
class: "group inline-flex items-center justify-center w-6 h-6
88
rounded-md bg-gray-100 hover:bg-[#0A66C2]
99
transition-colors duration-200" do %>
@@ -12,7 +12,7 @@
1212
<% end %>
1313

1414
<% if facilitator.instagram_url.present? %>
15-
<%= link_to facilitator.instagram_url, target: "_blank", rel: "noopener",
15+
<%= link_to facilitator.instagram_url, target: "_blank", rel: "noopener noreferrer",
1616
class: "group inline-flex items-center justify-center w-6 h-6
1717
rounded-md bg-gray-100 hover:bg-gradient-to-tr
1818
hover:from-[#F58529] hover:via-[#DD2A7B] hover:to-[#8134AF]
@@ -22,7 +22,7 @@
2222
<% end %>
2323

2424
<% if facilitator.facebook_url.present? %>
25-
<%= link_to facilitator.facebook_url, target: "_blank", rel: "noopener",
25+
<%= link_to facilitator.facebook_url, target: "_blank", rel: "noopener noreferrer",
2626
class: "group inline-flex items-center justify-center w-6 h-6
2727
rounded-md bg-gray-100 hover:bg-[#1877F2]
2828
transition-colors duration-200" do %>
@@ -31,7 +31,7 @@
3131
<% end %>
3232

3333
<% if facilitator.twitter_url.present? %>
34-
<%= link_to facilitator.twitter_url, target: "_blank", rel: "noopener",
34+
<%= link_to facilitator.twitter_url, target: "_blank", rel: "noopener noreferrer",
3535
class: "group inline-flex items-center justify-center w-6 h-6
3636
rounded-md bg-gray-100 hover:bg-[#1DA1F2]
3737
transition-colors duration-200" do %>
@@ -40,7 +40,7 @@
4040
<% end %>
4141

4242
<% if facilitator.youtube_url.present? %>
43-
<%= link_to facilitator.youtube_url, target: "_blank", rel: "noopener",
43+
<%= link_to facilitator.youtube_url, target: "_blank", rel: "noopener noreferrer",
4444
class: "group inline-flex items-center justify-center w-6 h-6
4545
rounded-md bg-gray-100 hover:bg-[#FF0000]
4646
text-gray-600 hover:text-white

app/views/projects/_social_media_buttons.html.erb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<div class="flex flex-wrap items-center gap-1">
44
<% if project.linked_in_url.present? %>
5-
<%= link_to project.linked_in_url, target: "_blank", rel: "noopener",
5+
<%= link_to project.linked_in_url, target: "_blank", rel: "noopener noreferrer",
66
class: "group inline-flex items-center justify-center w-6 h-6
77
rounded-md bg-gray-100 hover:bg-[#0A66C2]
88
transition-colors duration-200" do %>
@@ -11,7 +11,7 @@
1111
<% end %>
1212

1313
<% if project.instagram_url.present? %>
14-
<%= link_to project.instagram_url, target: "_blank", rel: "noopener",
14+
<%= link_to project.instagram_url, target: "_blank", rel: "noopener noreferrer",
1515
class: "group inline-flex items-center justify-center w-6 h-6
1616
rounded-md bg-gray-100 hover:bg-gradient-to-tr
1717
hover:from-[#F58529] hover:via-[#DD2A7B] hover:to-[#8134AF]
@@ -21,7 +21,7 @@
2121
<% end %>
2222

2323
<% if project.facebook_url.present? %>
24-
<%= link_to project.facebook_url, target: "_blank", rel: "noopener",
24+
<%= link_to project.facebook_url, target: "_blank", rel: "noopener noreferrer",
2525
class: "group inline-flex items-center justify-center w-6 h-6
2626
rounded-md bg-gray-100 hover:bg-[#1877F2]
2727
transition-colors duration-200" do %>
@@ -30,7 +30,7 @@
3030
<% end %>
3131

3232
<% if project.twitter_url.present? %>
33-
<%= link_to project.twitter_url, target: "_blank", rel: "noopener",
33+
<%= link_to project.twitter_url, target: "_blank", rel: "noopener noreferrer",
3434
class: "group inline-flex items-center justify-center w-6 h-6
3535
rounded-md bg-gray-100 hover:bg-[#1DA1F2]
3636
transition-colors duration-200" do %>
@@ -39,7 +39,7 @@
3939
<% end %>
4040

4141
<% if project.youtube_url.present? %>
42-
<%= link_to project.youtube_url, target: "_blank", rel: "noopener",
42+
<%= link_to project.youtube_url, target: "_blank", rel: "noopener noreferrer",
4343
class: "group inline-flex items-center justify-center w-6 h-6
4444
rounded-md bg-gray-100 hover:bg-[#FF0000]
4545
text-gray-600 hover:text-white

app/views/quotes/show.html.erb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,28 +96,28 @@
9696

9797
<!-- Facebook -->
9898
<%= link_to "https://www.facebook.com/sharer/sharer.php?u=#{quote_url}",
99-
target: "_blank", rel: "noopener",
99+
target: "_blank", rel: "noopener noreferrer",
100100
class: "text-blue-600 hover:text-blue-800" do %>
101101
<i class="fab fa-facebook-square fa-lg"></i>
102102
<% end %>
103103

104104
<!-- X / Twitter -->
105105
<%= link_to "https://twitter.com/intent/tweet?url=#{quote_url}&text=#{quote_title}",
106-
target: "_blank", rel: "noopener",
106+
target: "_blank", rel: "noopener noreferrer",
107107
class: "text-sky-500 hover:text-sky-700" do %>
108108
<i class="fab fa-x-twitter fa-lg"></i>
109109
<% end %>
110110

111111
<!-- LinkedIn -->
112112
<%= link_to "https://www.linkedin.com/sharing/share-offsite/?url=#{quote_url}",
113-
target: "_blank", rel: "noopener",
113+
target: "_blank", rel: "noopener noreferrer",
114114
class: "text-blue-700 hover:text-blue-900" do %>
115115
<i class="fab fa-linkedin fa-lg"></i>
116116
<% end %>
117117

118118
<!-- Pinterest -->
119119
<%= link_to "https://pinterest.com/pin/create/button/?url=#{quote_url}&description=#{quote_title}",
120-
target: "_blank", rel: "noopener",
120+
target: "_blank", rel: "noopener noreferrer",
121121
class: "text-red-600 hover:text-red-800" do %>
122122
<i class="fab fa-pinterest-square fa-lg"></i>
123123
<% end %>

app/views/resources/show.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<% end %>
1414

1515
<% if @resource.external_url.present? %>
16-
<%= link_to "Website", safe_url(@resource.external_url), target: "_blank", rel: "noopener",
16+
<%= link_to "Website", safe_url(@resource.external_url), target: "_blank", rel: "noopener noreferrer",
1717
class: "btn btn-secondary-outline" %>
1818
<% end %>
1919

app/views/shared/_navbar_menu.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
<span>Contact us</span>
120120
<% end %>
121121

122-
<%= link_to "https://www.awbw.org", target: "_blank", rel: "noopener",
122+
<%= link_to "https://www.awbw.org", target: "_blank", rel: "noopener noreferrer",
123123
class: "flex items-center gap-2 px-4 py-2 text-sm text-gray-700 hover:bg-gray-100" do %>
124124
<i class="fas fa-globe"></i>
125125
<span>Public website</span>

app/views/stories/edit.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<div class="flex items-center justify-between mb-6">
55
<h1 class="text-2xl font-semibold text-gray-900">Edit <%= @story.class.model_name.human %></h1>
66
<div class="text-right text-end space-x-2">
7-
<%= link_to "Website", safe_url(@story.external_url), target: "_blank", rel: "noopener",
7+
<%= link_to "Website", safe_url(@story.external_url), target: "_blank", rel: "noopener noreferrer",
88
class: "btn btn-secondary-outline" if @story.external_url %>
99
<%= link_to "View",
1010
story_path(@story),

app/views/stories/show.html.erb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</span>
1212

1313
<% if @story.external_url.present? %>
14-
<%= link_to "Website", safe_url(@story.external_url), target: "_blank", rel: "noopener",
14+
<%= link_to "Website", safe_url(@story.external_url), target: "_blank", rel: "noopener noreferrer",
1515
class: "btn btn-secondary-outline" %>
1616
<% end %>
1717

@@ -93,28 +93,28 @@
9393

9494
<!-- Facebook -->
9595
<%= link_to "https://www.facebook.com/sharer/sharer.php?u=#{story_url}",
96-
target: "_blank", rel: "noopener",
96+
target: "_blank", rel: "noopener noreferrer",
9797
class: "text-blue-600 hover:text-blue-800" do %>
9898
<i class="fab fa-facebook-square fa-lg"></i>
9999
<% end %>
100100

101101
<!-- X / Twitter -->
102102
<%= link_to "https://twitter.com/intent/tweet?url=#{story_url}&text=#{story_title}",
103-
target: "_blank", rel: "noopener",
103+
target: "_blank", rel: "noopener noreferrer",
104104
class: "text-sky-500 hover:text-sky-700" do %>
105105
<i class="fab fa-x-twitter fa-lg"></i>
106106
<% end %>
107107

108108
<!-- LinkedIn -->
109109
<%= link_to "https://www.linkedin.com/sharing/share-offsite/?url=#{story_url}",
110-
target: "_blank", rel: "noopener",
110+
target: "_blank", rel: "noopener noreferrer",
111111
class: "text-blue-700 hover:text-blue-900" do %>
112112
<i class="fab fa-linkedin fa-lg"></i>
113113
<% end %>
114114

115115
<!-- Pinterest -->
116116
<%= link_to "https://pinterest.com/pin/create/button/?url=#{story_url}&description=#{story_title}",
117-
target: "_blank", rel: "noopener",
117+
target: "_blank", rel: "noopener noreferrer",
118118
class: "text-red-600 hover:text-red-800" do %>
119119
<i class="fab fa-pinterest-square fa-lg"></i>
120120
<% end %>

app/views/workshops/_show_body.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
<div class="flex flex-wrap gap-4">
128128

129129
<% if workshop.main_image&.file&.attached? %>
130-
<%= link_to url_for(workshop.main_image.file), target: "_blank", rel: "noopener" do %>
130+
<%= link_to url_for(workshop.main_image.file), target: "_blank", rel: "noopener noreferrer" do %>
131131
<%= image_tag url_for(workshop.main_image.file),
132132
alt: "Main Image",
133133
class: "w-32 h-32 object-cover border border-gray-300 shadow-sm" %>
@@ -136,7 +136,7 @@
136136

137137
<% workshop.gallery_images.each_with_index do |gallery_image, idx| %>
138138
<% if gallery_image.file&.attached? %>
139-
<%= link_to url_for(gallery_image.file), target: "_blank", rel: "noopener" do %>
139+
<%= link_to url_for(gallery_image.file), target: "_blank", rel: "noopener noreferrer" do %>
140140
<%= image_tag url_for(gallery_image.file),
141141
alt: "Gallery Image #{idx + 1}",
142142
class: "w-32 h-32 object-cover border border-gray-300 shadow-sm" %>

0 commit comments

Comments
 (0)