From a2fe07433fec6c9f52f1ea36d7ef53bcd7c095a6 Mon Sep 17 00:00:00 2001 From: Benjamin Kellermann Date: Mon, 26 Oct 2009 15:56:00 +0100 Subject: fix encoding issue when creating poll with strange characters --- participate.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'participate.rb') 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 = < - + dudle - #{table.name} @@ -122,5 +123,6 @@ $htmlout += "" $htmlout += "" -$cgi.out("type" => TYPE ,"charset" => CHARSET,"cookie" => $utfcookie, "Cache-Control" => "no-cache"){$htmlout} +$header["Cache-Control"] = "no-cache" +$cgi.out($header){$htmlout} end -- cgit v1.2.3