Remove unnecessary h() calls on model attributes

These were necessary in the rails 2.x era, but not now.
This commit is contained in:
Andy Allan 2020-03-18 14:33:30 +01:00
parent a9c4b037a2
commit b8c1bbb4f8
21 changed files with 41 additions and 41 deletions

View file

@ -1,6 +1,6 @@
<div class="clearfix diary-comment<%= " deemphasize" unless diary_comment.visible? %>">
<%= user_thumbnail diary_comment.user %>
<p class="deemphasize comment-heading" id="comment<%= diary_comment.id %>"><%= t(".comment_from_html", :link_user => (link_to h(diary_comment.user.display_name), user_path(diary_comment.user)), :comment_created_at => link_to(l(diary_comment.created_at, :format => :friendly), :anchor => "comment#{diary_comment.id}")) %>
<p class="deemphasize comment-heading" id="comment<%= diary_comment.id %>"><%= t(".comment_from_html", :link_user => (link_to diary_comment.user.display_name, user_path(diary_comment.user)), :comment_created_at => link_to(l(diary_comment.created_at, :format => :friendly), :anchor => "comment#{diary_comment.id}")) %>
<% if current_user and diary_comment.user.id != current_user.id %>
| <%= report_link(t(".report"), diary_comment) %>
<% end %>

View file

@ -4,10 +4,10 @@
<%= user_thumbnail diary_entry.user %>
<% end %>
<h2><%= link_to h(diary_entry.title), diary_entry_path(diary_entry.user, diary_entry) %></h2>
<h2><%= link_to diary_entry.title, diary_entry_path(diary_entry.user, diary_entry) %></h2>
<small class='deemphasize'>
<%= t(".posted_by_html", :link_user => (link_to h(diary_entry.user.display_name), user_path(diary_entry.user)), :created => l(diary_entry.created_at, :format => :blog), :language_link => (link_to diary_entry.language.name, :controller => "diary_entries", :action => "index", :display_name => nil, :language => diary_entry.language_code)) %>
<%= t(".posted_by_html", :link_user => (link_to diary_entry.user.display_name, user_path(diary_entry.user)), :created => l(diary_entry.created_at, :format => :blog), :language_link => (link_to diary_entry.language.name, :controller => "diary_entries", :action => "index", :display_name => nil, :language => diary_entry.language_code)) %>
</small>
</div>

View file

@ -3,7 +3,7 @@
<% if @user %>
<%= user_image @user %>
<% end %>
<h1><%= h(@title) %></h1>
<h1><%= @title %></h1>
<ul class='secondary-actions clearfix'>
<% unless params[:friends] or params[:nearby] -%>