aboutsummaryrefslogtreecommitdiff
path: root/remove_poll.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 /remove_poll.rb
parent985631b3cbe7a34854f3888a453cf6e9f3d6199e (diff)
fix encoding issue when creating poll with strange characters
Diffstat (limited to '')
-rwxr-xr-xremove_poll.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/remove_poll.rb b/remove_poll.rb
index 3a0ebb1..542303d 100755
--- a/remove_poll.rb
+++ b/remove_poll.rb
@@ -19,10 +19,11 @@ require "ftools"
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"
POLL = File.basename(File.expand_path("."))
@@ -31,7 +32,7 @@ $htmlout = <<HEAD
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<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 - delete - #{POLL}</title>
<link rel="stylesheet" type="text/css" href="../dudle.css" title="default"/>
@@ -86,6 +87,7 @@ $htmlout += "</body>"
$htmlout += "</html>"
-$cgi.out("type" => TYPE ,"charset" => CHARSET, "Cache-Control" => "no-cache"){$htmlout}
+$header["Cache-Control"] = "no-cache"
+$cgi.out($header){$htmlout}
end