Don't sanitize <span> tags in HTML attributes

Doing so will cause the `<span>` tag to be rendered in the document,
instead of being rendered as a data attribute.
This commit is contained in:
Javi Martín
2019-10-11 13:45:41 +02:00
parent 8a752b5e09
commit 31c2379a4e

View File

@@ -1,7 +1,7 @@
<div class="row globalize-languages column padding-top <%= highlight_translation_html_class %>" <div class="row globalize-languages column padding-top <%= highlight_translation_html_class %>"
data-zero-languages-description="<%= sanitize(t("shared.translations.languages_in_use", count: 0)) %>" data-zero-languages-description="<%= t("shared.translations.languages_in_use", count: 0) %>"
data-one-languages-description="<%= sanitize(t("shared.translations.languages_in_use", count: 1)) %>" data-one-languages-description="<%= t("shared.translations.languages_in_use", count: 1) %>"
data-other-languages-description="<%= sanitize(t("shared.translations.languages_in_use", count: 2)) %>"> data-other-languages-description="<%= t("shared.translations.languages_in_use", count: 2) %>">
<div class="small-6 large-3 column"> <div class="small-6 large-3 column">
<span class="small"> <span class="small">
<strong class="js-languages-description"><%= selected_languages_description(resource) %></strong> <strong class="js-languages-description"><%= selected_languages_description(resource) %></strong>