aboutsummaryrefslogtreecommitdiff
path: root/participate.rb
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-10-26 15:56:00 +0100
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-10-26 15:56:00 +0100
commita2fe07433fec6c9f52f1ea36d7ef53bcd7c095a6 (patch)
tree82b528d3ec6331d4424b3b21f91ca25b3cc3cfb5 /participate.rb
parent985631b3cbe7a34854f3888a453cf6e9f3d6199e (diff)
fix encoding issue when creating poll with strange characters
Diffstat (limited to 'participate.rb')
-rwxr-xr-xparticipate.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/participate.rb b/participate.rb
index 7937ffc..57ecedf 100755
--- a/participate.rb
+++ b/participate.rb
@@ -13,10 +13,11 @@ require "cgi"
if __FILE__ == $0
$cgi = CGI.new
+$header = {}
-TYPE = "text/html"
-#TYPE = "application/xhtml+xml"
-CHARSET = "utf-8"
+$header["type"] = "text/html"
+#$header["type"] = "application/xhtml+xml"
+$header["charset"] = "utf-8"
$htmlout = <<HEAD
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
@@ -60,7 +61,7 @@ end
$htmlout += <<HEAD
<head>
- <meta http-equiv="Content-Type" content="#{TYPE}; charset=#{CHARSET}" />
+ <meta http-equiv="Content-Type" content="#{$header["type"]}; charset=#{$header["charset"]}" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<title>dudle - #{table.name}</title>
<link rel="stylesheet" type="text/css" href="../dudle.css" title="default"/>
@@ -122,5 +123,6 @@ $htmlout += "</div></body>"
$htmlout += "</html>"
-$cgi.out("type" => TYPE ,"charset" => CHARSET,"cookie" => $utfcookie, "Cache-Control" => "no-cache"){$htmlout}
+$header["Cache-Control"] = "no-cache"
+$cgi.out($header){$htmlout}
end