From: John Dong The winner is:
- <%= @candidates[result.winner].name.capitalize %>
<% for cand in flash[:candlist] %>
-
<% end %>
diff --git a/app/views/quickvote/_pref_table.rhtml b/app/views/quickvote/_pref_table.rhtml
index 01de22b..011fcbe 100644
--- a/app/views/quickvote/_pref_table.rhtml
+++ b/app/views/quickvote/_pref_table.rhtml
@@ -9,11 +9,13 @@
+
<% candidates.each do |winner| -%>
<% candidates.each do |candidate| -%>
- <%= names[candidate] -%>
- <% end -%>
+ <%=h names[candidate] -%>
+ <% end -%>
+
-
<% end -%>
-
+
diff --git a/app/views/quickvote/_result.rhtml b/app/views/quickvote/_result.rhtml
index e10890a..b643224 100644
--- a/app/views/quickvote/_result.rhtml
+++ b/app/views/quickvote/_result.rhtml
@@ -1,10 +1,9 @@
<% %>
<% if result.winner? and result.winners.length == 1%>
<%= names[winner] %>
+ <%=h names[winner] %>
<% candidates.each do |loser| -%>
<% if winner == loser -%>
--
@@ -27,4 +29,4 @@
<% end -%>
There was a tie. The winners are: <%= - result.winners.collect {|w| @candidates[w].to_s.capitalize}.join(", ") %>
+There was a tie. The winners are: <%=h( result.winners.collect {|w| @candidates[w].to_s.capitalize}.join(", ") )%>
<% else %>There is no winner using this method.
<% end %> diff --git a/app/views/quickvote/_victories_ties.rhtml b/app/views/quickvote/_victories_ties.rhtml index 7c3506a..993caa8 100644 --- a/app/views/quickvote/_victories_ties.rhtml +++ b/app/views/quickvote/_victories_ties.rhtml @@ -4,9 +4,9 @@<%= names[victor] %> | +<%=h names[victor] %> | <% victories[victor].keys.each do |loser| %> -<%= names[loser] %> (<%= victories[victor][loser] %>) | +<%=h names[loser] %> (<%= victories[victor][loser] %>) | <% end -%><%w.search_whois%> - <%= (w.all.grep(/^(OrgName|org-name)/)[0] or "").sub(/^(OrgName|org-name)\:/,'').strip -%> - <%= (w.all.grep(/^(NetName|netname)/)[0] or "").sub(/^(NetName|netname)\:/,'').strip %> + <%=h (w.all.grep(/^(OrgName|org-name)/)[0] or "").sub(/^(OrgName|org-name)\:/,'').strip -%> - <%= (w.all.grep(/^(NetName|netname)/)[0] or "").sub(/^(NetName|netname)\:/,'').strip %> <% rescue ArgumentError => err %> - <%= err %> + <%=h err %> | -<%= err%> + | <%=h err%> <% end %> | <%= voter.vote.votestring %> | diff --git a/app/views/quickvote/thanks.rhtml b/app/views/quickvote/thanks.rhtml index 1975eb7..0fb3610 100644 --- a/app/views/quickvote/thanks.rhtml +++ b/app/views/quickvote/thanks.rhtml @@ -5,7 +5,7 @@ preferences:
---|