Use ActionView's safe_join to avoid using raw when joining arrays of text
This commit is contained in:
parent
5aa255e13f
commit
53f2c36f1d
2 changed files with 2 additions and 2 deletions
|
@ -24,7 +24,7 @@
|
|||
<%= t ".by" %> <%= link_to h(trace.user.display_name), user_path(trace.user) %>
|
||||
<% if !trace.tags.empty? %>
|
||||
<%= t ".in" %>
|
||||
<%= raw(trace.tags.collect { |tag| link_to_tag tag.tag }.join(", ")) %>
|
||||
<%= safe_join(trace.tags.collect { |tag| link_to_tag tag.tag }, ", ") %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<td><%= t ".tags" %></td>
|
||||
<td>
|
||||
<% unless @trace.tags.empty? %>
|
||||
<%= raw(@trace.tags.collect { |tag| link_to tag.tag, :controller => "traces", :action => "index", :tag => tag.tag, :id => nil }.join(", ")) %>
|
||||
<%= safe_join(@trace.tags.collect { |tag| link_to tag.tag, :controller => "traces", :action => "index", :tag => tag.tag, :id => nil }, ", ") %>
|
||||
<% else %>
|
||||
<i><%= t ".none" %></i>
|
||||
<% end %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue