<% -%>
<div id="cand<%= @current_candidate.id %>">
- <li><%= @current_candidate.name -%>
+ <li><%=h @current_candidate.name -%>
<% if @show_details %>
(<%= link_to_remote "Hide Details",
:update => "cand#{@current_candidate.id}",
<% -%>
<div id="cand<%= @current_candidate.id %>">
-<p><strong><%= @current_candidate.name %></strong>
+<p><strong><%=h @current_candidate.name %></strong>
(<%= link_to_remote "Delete",
:complete => "Element.remove('cand#{@current_candidate.id}')",
:url => { :action => :delete_candidate,
<ul>
<% for candidate in @winners %>
- <li><%= @candidates_by_id[candidate].name %></li>
+ <li><%=h @candidates_by_id[candidate].name %></li>
<% end %>
</ul>
<% winner = @winners[0] %>
<p>The winner of the election was:
- <strong><%= @candidates_by_id[winner].name %></strong>
+ <strong><%=h @candidates_by_id[winner].name %></strong>
</p>
<% end %>
<tr>
<th></th>
<% for candidate in @election.candidates.sort %>
- <th><%= candidate.name %></th>
+ <th><%=h candidate.name %></th>
<% end %>
</tr>
<% for cand1 in @election.candidates.sort %>
<tr>
- <th><%= cand1.name %></th>
+ <th><%=h cand1.name %></th>
<% for cand2 in @election.candidates.sort %>
<td>
<% if cand1 == cand2 %>
-<h1><strong><%= @election.name %>:</strong> Edit Overview</h1>
+<h1><strong><%=h @election.name %>:</strong> Edit Overview</h1>
<% form_tag(:action => 'update', :id => @election) do %>
<%= render :partial => 'overview_form' %>
-<h1>Editing <%= @candidate.name %></h1>
+<h1>Editing <%=h @candidate.name %></h1>
<%= error_messages_for :candidate %>
<% form_tag( { :action => :update_candidate, :id => @candidate.id },
<% for election in @elections %>
<tr>
- <td valign="top"><h2><%= link_to election.name, :action => 'show', :id => election %></h2>
+ <td valign="top"><h2><%=h link_to election.name, :action => 'show', :id => election %></h2>
<p><strong>Description:</strong></p>
- <blockquote><%= election.description %></blockquote>
+ <blockquote><%=h election.description %></blockquote>
<p><strong>Election Information:</strong></p>
<ul>
<% @edit = true %>
-<h1><strong><%= @election.name %>:</strong> Enter List of Voter Email Addresses</h1>
+<h1><strong><%=h @election.name %>:</strong> Enter List of Voter Email Addresses</h1>
<%= render :partial => 'voter_list' %>