Use safe_join instead of <%==

Using `<%==` is the same as using `raw`, and here we only want to mark
as safe a `<br>` tag.
This commit is contained in:
Javi Martín
2019-10-06 04:22:48 +02:00
parent 00a6f5b601
commit a20c0f078d
2 changed files with 2 additions and 2 deletions

View File

@@ -65,7 +65,7 @@ module ProposalsDashboardHelper
supports: number_with_delimiter(resource.required_supports, supports: number_with_delimiter(resource.required_supports,
delimiter: ".")) if resource.required_supports > 0 delimiter: ".")) if resource.required_supports > 0
label.join(" #{t("dashboard.resource.and")}<br>") safe_join label, h(" #{t("dashboard.resource.and")})") + tag(:br)
end end
def daily_selected_class def daily_selected_class

View File

@@ -23,7 +23,7 @@
class: "button expanded" %> class: "button expanded" %>
<% else %> <% else %>
<strong> <strong>
<%== resource_availability_label(resource) %> <%= resource_availability_label(resource) %>
</strong> </strong>
<% end %> <% end %>
</div> </div>