Fix typos in HTML target attributes

In some places, we were using `blank` instead of `_blank`. Most browsers
treat `blank` like `_blank`, though, so most people didn't experience
any difference.

In another place, we were incorrectly passing the `target` option inside
an `options:` hash, resulting in invalid HTML.
This commit is contained in:
Javi Martín
2023-10-05 20:46:01 +02:00
parent cdc5e05d48
commit 0b0cbcfe5a
6 changed files with 11 additions and 11 deletions

View File

@@ -34,7 +34,7 @@
<%= actions.action(:show, <%= actions.action(:show,
text: t("admin.site_customization.pages.index.see_page"), text: t("admin.site_customization.pages.index.see_page"),
path: page.url, path: page.url,
options: { target: "_blank" }) %> target: "_blank") %>
<% end %> <% end %>
<% end %> <% end %>
</td> </td>

View File

@@ -92,8 +92,8 @@
<%= f.check_box :terms_of_service, <%= f.check_box :terms_of_service,
title: t("form.accept_terms_title"), title: t("form.accept_terms_title"),
label: t("form.accept_terms", label: t("form.accept_terms",
policy: link_to(t("form.policy"), "/privacy", target: "blank"), policy: link_to(t("form.policy"), "/privacy", target: "_blank"),
conditions: link_to(t("form.conditions"), "/conditions", target: "blank")) %> conditions: link_to(t("form.conditions"), "/conditions", target: "_blank")) %>
</div> </div>
<% end %> <% end %>

View File

@@ -44,8 +44,8 @@
<%= f.check_box :terms_of_service, <%= f.check_box :terms_of_service,
title: t("form.accept_terms_title"), title: t("form.accept_terms_title"),
label: t("form.accept_terms", label: t("form.accept_terms",
policy: link_to(t("form.policy"), "/privacy", target: "blank"), policy: link_to(t("form.policy"), "/privacy", target: "_blank"),
conditions: link_to(t("form.conditions"), "/conditions", target: "blank")) %> conditions: link_to(t("form.conditions"), "/conditions", target: "_blank")) %>
</div> </div>
<% end %> <% end %>

View File

@@ -7,8 +7,8 @@
<p class="info"> <p class="info">
<%= sanitize(t("layouts.footer.description", <%= sanitize(t("layouts.footer.description",
open_source: link_to(t("layouts.footer.open_source"), t("layouts.footer.open_source_url"), target: "blank", rel: "nofollow"), open_source: link_to(t("layouts.footer.open_source"), t("layouts.footer.open_source_url"), target: "_blank", rel: "nofollow"),
consul: link_to(t("layouts.footer.consul"), t("layouts.footer.consul_url"), target: "blank", rel: "nofollow"))) %> consul: link_to(t("layouts.footer.consul"), t("layouts.footer.consul_url"), target: "_blank", rel: "nofollow"))) %>
</p> </p>
</div> </div>

View File

@@ -99,8 +99,8 @@
<%= f.check_box :terms_of_service, <%= f.check_box :terms_of_service,
title: t("form.accept_terms_title"), title: t("form.accept_terms_title"),
label: t("form.accept_terms", label: t("form.accept_terms",
policy: link_to(t("form.policy"), "/privacy", target: "blank"), policy: link_to(t("form.policy"), "/privacy", target: "_blank"),
conditions: link_to(t("form.conditions"), "/conditions", target: "blank")) %> conditions: link_to(t("form.conditions"), "/conditions", target: "_blank")) %>
</div> </div>
<% end %> <% end %>

View File

@@ -65,8 +65,8 @@
<%= f.check_box :terms_of_service, <%= f.check_box :terms_of_service,
title: t("form.accept_terms_title"), title: t("form.accept_terms_title"),
label: t("form.accept_terms", label: t("form.accept_terms",
policy: link_to(t("form.policy"), "/privacy", target: "blank"), policy: link_to(t("form.policy"), "/privacy", target: "_blank"),
conditions: link_to(t("form.conditions"), "/conditions", target: "blank")) %> conditions: link_to(t("form.conditions"), "/conditions", target: "_blank")) %>
<% end %> <% end %>
</div> </div>