Use raw instead of html_safe

They do the exact same thing; however `html_safe` might confuse
developers into thinking it will make the HTML safe. Using `raw` makes
it clear that we're inserting the text without escaping it.
This commit is contained in:
Javi Martín
2019-10-06 16:22:01 +02:00
parent 9eee79f218
commit 89402bdbf6
7 changed files with 12 additions and 12 deletions

View File

@@ -32,7 +32,7 @@
<% @content_blocks.each do |content_block| %>
<tr id="<%= dom_id(content_block) %>">
<td><%= link_to "#{content_block.name} (#{content_block.locale})", edit_admin_site_customization_content_block_path(content_block) %></td>
<td><%= content_block.body.html_safe %></td>
<td><%= raw content_block.body %></td>
<td>
<%= link_to t("admin.site_customization.content_blocks.index.delete"),
admin_site_customization_content_block_path(content_block),
@@ -43,7 +43,7 @@
<% @headings_content_blocks.each do |content_block| %>
<tr id="<%= dom_id(content_block) %>">
<td><%= link_to "#{content_block.heading.name} (#{content_block.locale})", admin_site_customization_edit_heading_content_block_path(content_block) %></td>
<td><%= content_block.body.html_safe %></td>
<td><%= raw content_block.body %></td>
<td>
<%= link_to t("admin.site_customization.content_blocks.index.delete"),
admin_site_customization_delete_heading_content_block_path(content_block.id),