aboutsummaryrefslogtreecommitdiff
path: root/poll.rb
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-09-18 15:12:28 +0200
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-09-18 15:12:28 +0200
commit23e0cc632a6546643afcb3f8e63da023f93d65d9 (patch)
tree356debf1d858e10ac5caa8d571176711650ad107 /poll.rb
parent954905188d25d62ff7522a96fa4e34394353f075 (diff)
space and + are not allowed in id= and for=
Diffstat (limited to 'poll.rb')
-rw-r--r--poll.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/poll.rb b/poll.rb
index c0d33e2..2d90056 100644
--- a/poll.rb
+++ b/poll.rb
@@ -142,12 +142,12 @@ class Poll
[[YES, YESVAL],[NO, NOVAL],[MAYBE, MAYBEVAL]].each{|valhuman, valbinary|
ret += "<tr>
<td class='input-#{valbinary}'>
- <label for=\"add_participant_checked_#{CGI.escapeHTML(columntitle.to_s)}_#{valbinary}\">#{valhuman}</label>
+ <label for=\"add_participant_checked_#{CGI.escapeHTML(columntitle.to_s.gsub(" ","_").gsub("+","_"))}_#{valbinary}\">#{valhuman}</label>
</td>
<td>
<input type='radio'
value='#{valbinary}'
- id=\"add_participant_checked_#{CGI.escapeHTML(columntitle.to_s)}_#{valbinary}\"
+ id=\"add_participant_checked_#{CGI.escapeHTML(columntitle.to_s.gsub(" ","_").gsub("+","_"))}_#{valbinary}\"
name=\"add_participant_checked_#{CGI.escapeHTML(columntitle.to_s)}\"
title=\"#{CGI.escapeHTML(columntitle.to_s)}\" #{checked[columntitle] == valbinary ? "checked='checked'":""}/>
</td>