aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2010-02-08 13:37:43 +0100
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2010-02-08 13:37:43 +0100
commita381395d4f66caa5f979071c7ffc3c6a70107cdf (patch)
tree753c82371b1b4b61a3b6811a6260e271ac8b0811
parentfe0e105b0db8ca8716a80ab7a0b2be5c990a23aa (diff)
accept charset in forms
-rwxr-xr-xcustomize.rb2
-rwxr-xr-xdelete_poll.rb2
-rwxr-xr-xparticipate.rb2
-rw-r--r--poll.rb3
-rw-r--r--pollhead.rb2
-rw-r--r--timepollhead.rb2
6 files changed, 7 insertions, 6 deletions
diff --git a/customize.rb b/customize.rb
index 28a5c48..d9c5dc8 100755
--- a/customize.rb
+++ b/customize.rb
@@ -88,7 +88,7 @@ usernamestr = _("Username:")
$d << <<CHARSET
<div id='config_user'>
<h3>#{defaultuserstr}</h3>
-<form method='get' action=''>
+<form method='get' action='' accept-charset='utf-8'>
<table>
<tr id='usernamesetting'>
<td>
diff --git a/delete_poll.rb b/delete_poll.rb
index 15190ab..d1d7f21 100755
--- a/delete_poll.rb
+++ b/delete_poll.rb
@@ -96,7 +96,7 @@ $d.html << _("If you are sure in what you are doing, please type into the form")
deletestr = _("Delete")
$d.html << <<TABLE
#{hint}
- <form method='post' action=''>
+ <form method='post' action='' accept-charset='utf-8'>
<div>
<input type='hidden' name='confirmnumber' value='#{CONFIRM}' />
<input size='30' type='text' name='confirm' value='#{USERCONFIRM}' />
diff --git a/participate.rb b/participate.rb
index 798d185..d51f92b 100755
--- a/participate.rb
+++ b/participate.rb
@@ -57,7 +57,7 @@ END
# TABLE
$d << <<HTML
<div id='polltable'>
- <form method='post' action='.'>
+ <form method='post' action='.' accept-charset='utf-8'>
#{$d.table.to_html($cgi['edituser'])}
</form>
</div>
diff --git a/poll.rb b/poll.rb
index 8d506e8..6f49ed3 100644
--- a/poll.rb
+++ b/poll.rb
@@ -23,6 +23,7 @@ require "time"
require "pollhead"
require "timepollhead"
+$KCODE = "u"
class String
def to_htmlID
CGI.escapeHTML(self.gsub(/[^A-Z^a-z^0-9^\-^_^:^\.]/,"."))
@@ -243,7 +244,7 @@ COMMENT
saysstr = _("says")
submitstr = _("Submit Comment")
ret += <<ADDCOMMENT
- <form method='post' action='.'>
+ <form method='post' action='.' accept-charset='utf-8'>
<div class='comment' id='add_comment'>
<input value='Anonymous' type='text' name='commentname' size='9' /> #{saysstr}&nbsp;
<br />
diff --git a/pollhead.rb b/pollhead.rb
index 00cae00..5026c23 100644
--- a/pollhead.rb
+++ b/pollhead.rb
@@ -100,7 +100,7 @@ EDITDELETE
addeditstr = _("Add/Edit Column")
previewstr = _("Preview")
ret = <<END
-<form method='post' action=''>
+<form method='post' action='' accept-charset='utf-8'>
<div>
<label for='columntitle'>#{columntitlestr}: </label>
<input id='columntitle' size='16' type='text' value="#{title}" name='new_columnname' />
diff --git a/timepollhead.rb b/timepollhead.rb
index 569ff3f..fa7090f 100644
--- a/timepollhead.rb
+++ b/timepollhead.rb
@@ -353,7 +353,7 @@ END
days.each{|d|
ret += <<END
<td>
- <form method='post' action=''>
+ <form method='post' action='' accept-charset='utf-8'>
<div>
<input type='hidden' name='new_columnname' value='#{d.strftime("%Y-%m-%d")}' />
<input type='hidden' name='add_remove_column_month' value='#{d.strftime("%Y-%m")}' />