0
我从视图调用助手方法来显示一些媒体。“<br>”正在改为“<br>”,即使我使用html_safe?
index.html.erb
<%= media_display(:media => m[:media], :thumbnail => true).html_safe %>
application_helper.rb
def media_display p = {}
(image_tag p[:media].author_picture) + "<br>"
end
HTML输出
<img src="path_to_image" alt="Bartolo_normal"><br>
图像HTML工作正常。为什么<br>
不能通过允许的HTML?