aboutsummaryrefslogtreecommitdiff
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
parent954905188d25d62ff7522a96fa4e34394353f075 (diff)
space and + are not allowed in id= and for=
Diffstat (limited to '')
-rw-r--r--poll.rb4
-rw-r--r--timepoll.rb2
2 files changed, 3 insertions, 3 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>
diff --git a/timepoll.rb b/timepoll.rb
index ea6f82a..09b8d63 100644
--- a/timepoll.rb
+++ b/timepoll.rb
@@ -42,7 +42,7 @@ class TimePoll < Poll
@head.keys.sort.each{|curdate|
ret += "<th><a title='#{curdate}' href='?sort=#{CGI.escapeHTML(CGI.escape(curdate.to_s))}'>#{curdate.strftime("%H:%M")}</a></th>\n"
}
- ret += "<th><a href='.'>Last Edit</a></th></tr>"
+ ret += "<th><a href='.'>Last Edit</a></th></tr>\n"
ret
end