X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/40891d8740b77b6d6249e8982f15e2f348725282..baf9ff0ec39c13f52ee8d4f087641dc5fcc9c53b:/app/controllers/quickvote_controller.rb diff --git a/app/controllers/quickvote_controller.rb b/app/controllers/quickvote_controller.rb index 2847df9..4783eb2 100644 --- a/app/controllers/quickvote_controller.rb +++ b/app/controllers/quickvote_controller.rb @@ -15,7 +15,7 @@ class QuickvoteController < ApplicationController # store the candidate grabbed through ajax and stored in flash @quickvote.candidatelist = flash[:candlist] - + @quickvote.description=CGI.escapeHTML(@quickvote.description) # try to save, if it fails, show the page again (the flash should # still be intact if @quickvote.save @@ -37,7 +37,7 @@ class QuickvoteController < ApplicationController candidate_name = CGI.escapeHTML(params[:ajax][:newcandidate]) unless candidate_name.strip.empty? if flash.has_key?(:candlist) and flash[:candlist].instance_of?(Array) - flash[:candlist] << candidate_name + flash[:candlist] << candidate_name unless flash[:candlist].index(candidate_name) else flash[:candlist] = [ candidate_name ] end