added the ability to add safe html tags to input (i.e., images)
[selectricity-live] / app / views / common / _result.rhtml
index b0a3a8522363fcdd8dde2eb70eb7c261ca7e6cb2..ea0ec40820c118091ec28f79410d18cca19d2ed8 100644 (file)
@@ -2,9 +2,9 @@
 <p class="winner_text">
 <% if result.winner? and result.winners.length == 1 -%>
   The winner is:
-     <strong><%=h @candidates[result.winner].name.capitalize %></strong>
+     <strong><%= white_list(@candidates[result.winner].name.capitalize) %></strong>
 <% elsif result.winner? and result.winners.length > 1 %>
-  There was a tie. The winners are: <strong><%=h( result.winners.collect {|w| @candidates[w].to_s.capitalize}.join(", ") )%></strong>
+  There was a tie. The winners are: <strong><%= white_list(result.winners.collect {|w| @candidates[w].to_s.capitalize}.join(", ") )%></strong>
 <% else %>
   <p>There is no winner using this method. </strong>
 <% end %>

Benjamin Mako Hill || Want to submit a patch?