From: Tom Hughes Date: Mon, 24 Aug 2015 09:49:04 +0000 (+0100) Subject: Don't treat flash messages as raw X-Git-Tag: live~4021 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/618526ba6297895d5ed4aaf04766afaab2f46544 Don't treat flash messages as raw This will likely break some things, but we should fix them properly so that the rails auto-escaping can work. Fixes #1027 --- diff --git a/app/views/layouts/_flash.html.erb b/app/views/layouts/_flash.html.erb index 5a4288c4d..e72185101 100644 --- a/app/views/layouts/_flash.html.erb +++ b/app/views/layouts/_flash.html.erb @@ -1,20 +1,20 @@ <% if flash[:error] %>
<%= image_tag("notice.png", :class => "small_icon", :border => 0) %> -
<%= raw flash[:error] %>
+
<%= flash[:error] %>
<% end %> <% if flash[:warning] %>
<%= image_tag("notice.png", :class => "small_icon", :border => 0) %> -
<%= raw flash[:warning] %>
+
<%= flash[:warning] %>
<% end %> <% if flash[:notice] %>
<%= image_tag("notice.png", :class => "small_icon", :border => 0) %> -
<%= raw flash[:notice] %>
+
<%= flash[:notice] %>
<% end %>