From 0b0cbcfe5a6c92bf43ea76d43adb9908cbfe61cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Thu, 5 Oct 2023 20:46:01 +0200 Subject: [PATCH] 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. --- .../admin/site_customization/pages/index_component.html.erb | 2 +- app/components/budgets/investments/form_component.html.erb | 4 ++-- app/components/debates/form_component.html.erb | 4 ++-- app/components/layout/footer_component.html.erb | 4 ++-- app/components/proposals/form_component.html.erb | 4 ++-- app/views/legislation/proposals/_form.html.erb | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/components/admin/site_customization/pages/index_component.html.erb b/app/components/admin/site_customization/pages/index_component.html.erb index 68db19b5f..c5f6ebac0 100644 --- a/app/components/admin/site_customization/pages/index_component.html.erb +++ b/app/components/admin/site_customization/pages/index_component.html.erb @@ -34,7 +34,7 @@ <%= actions.action(:show, text: t("admin.site_customization.pages.index.see_page"), path: page.url, - options: { target: "_blank" }) %> + target: "_blank") %> <% end %> <% end %> diff --git a/app/components/budgets/investments/form_component.html.erb b/app/components/budgets/investments/form_component.html.erb index 228aec322..7e0c52280 100644 --- a/app/components/budgets/investments/form_component.html.erb +++ b/app/components/budgets/investments/form_component.html.erb @@ -92,8 +92,8 @@ <%= f.check_box :terms_of_service, title: t("form.accept_terms_title"), label: t("form.accept_terms", - policy: link_to(t("form.policy"), "/privacy", target: "blank"), - conditions: link_to(t("form.conditions"), "/conditions", target: "blank")) %> + policy: link_to(t("form.policy"), "/privacy", target: "_blank"), + conditions: link_to(t("form.conditions"), "/conditions", target: "_blank")) %> <% end %> diff --git a/app/components/debates/form_component.html.erb b/app/components/debates/form_component.html.erb index 851269d1b..e0f14ef06 100644 --- a/app/components/debates/form_component.html.erb +++ b/app/components/debates/form_component.html.erb @@ -44,8 +44,8 @@ <%= f.check_box :terms_of_service, title: t("form.accept_terms_title"), label: t("form.accept_terms", - policy: link_to(t("form.policy"), "/privacy", target: "blank"), - conditions: link_to(t("form.conditions"), "/conditions", target: "blank")) %> + policy: link_to(t("form.policy"), "/privacy", target: "_blank"), + conditions: link_to(t("form.conditions"), "/conditions", target: "_blank")) %> <% end %> diff --git a/app/components/layout/footer_component.html.erb b/app/components/layout/footer_component.html.erb index 52f78b18d..dc9a559fd 100644 --- a/app/components/layout/footer_component.html.erb +++ b/app/components/layout/footer_component.html.erb @@ -7,8 +7,8 @@

<%= sanitize(t("layouts.footer.description", - 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"))) %> + 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"))) %>

diff --git a/app/components/proposals/form_component.html.erb b/app/components/proposals/form_component.html.erb index fddca56bb..7884aa270 100644 --- a/app/components/proposals/form_component.html.erb +++ b/app/components/proposals/form_component.html.erb @@ -99,8 +99,8 @@ <%= f.check_box :terms_of_service, title: t("form.accept_terms_title"), label: t("form.accept_terms", - policy: link_to(t("form.policy"), "/privacy", target: "blank"), - conditions: link_to(t("form.conditions"), "/conditions", target: "blank")) %> + policy: link_to(t("form.policy"), "/privacy", target: "_blank"), + conditions: link_to(t("form.conditions"), "/conditions", target: "_blank")) %> <% end %> diff --git a/app/views/legislation/proposals/_form.html.erb b/app/views/legislation/proposals/_form.html.erb index b1cf5d8b4..03e905aee 100644 --- a/app/views/legislation/proposals/_form.html.erb +++ b/app/views/legislation/proposals/_form.html.erb @@ -65,8 +65,8 @@ <%= f.check_box :terms_of_service, title: t("form.accept_terms_title"), label: t("form.accept_terms", - policy: link_to(t("form.policy"), "/privacy", target: "blank"), - conditions: link_to(t("form.conditions"), "/conditions", target: "blank")) %> + policy: link_to(t("form.policy"), "/privacy", target: "_blank"), + conditions: link_to(t("form.conditions"), "/conditions", target: "_blank")) %> <% end %>