From 31c2379a4ef3978330d122b8296ca718a089b099 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Fri, 11 Oct 2019 13:45:41 +0200 Subject: [PATCH 1/3] Don't sanitize `` tags in HTML attributes Doing so will cause the `` tag to be rendered in the document, instead of being rendered as a data attribute. --- app/views/shared/_common_globalize_locales.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/shared/_common_globalize_locales.html.erb b/app/views/shared/_common_globalize_locales.html.erb index e48aef1e5..7eed43d55 100644 --- a/app/views/shared/_common_globalize_locales.html.erb +++ b/app/views/shared/_common_globalize_locales.html.erb @@ -1,7 +1,7 @@
" - data-one-languages-description="<%= sanitize(t("shared.translations.languages_in_use", count: 1)) %>" - data-other-languages-description="<%= sanitize(t("shared.translations.languages_in_use", count: 2)) %>"> + data-zero-languages-description="<%= t("shared.translations.languages_in_use", count: 0) %>" + data-one-languages-description="<%= t("shared.translations.languages_in_use", count: 1) %>" + data-other-languages-description="<%= t("shared.translations.languages_in_use", count: 2) %>">
<%= selected_languages_description(resource) %> From d61e8cb6a6f59b00f0c6a47dfd4f2b5317c7057e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Fri, 18 Oct 2019 22:00:27 +0200 Subject: [PATCH 2/3] Use text() instead of html() Using html() makes it possible to insert