Bug 474657: Force all generated pages to use charset=utf-8, patch by cls <cls@seawood.org>, r=reed

git-svn-id: svn://10.0.0.236/trunk@258782 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
gavin%gavinsharp.com 2009-10-25 03:56:37 +00:00
parent 04023ebf47
commit 3e354b7b7f
7 changed files with 18 additions and 18 deletions

View File

@ -50,7 +50,7 @@ if (defined($args = $form{log})) {
$buildtime = $form{buildtime};
}
print "Content-Type:text/html\n";
print "Content-Type:text/html; charset=utf-8\n";
# Remember email address in cookie
#

View File

@ -29,7 +29,7 @@ my %form = &split_cgi_args();
$|=1;
print "Content-type: text/html\n\n";
print "Content-Type: text/html; charset=utf-8\n\n";
$form{noignore} = 1; # Force us to load all build info, not
# paying any attention to ignore_builds stuff.

View File

@ -47,7 +47,7 @@ if ($command eq 'create_tree') {
$tree = &require_only_one_tree($tree);
}
print "Content-type: text/html\n\n<HTML>\n";
print "Content-Type: text/html; charset=utf-8\n\n<HTML>\n";
if( $command eq 'create_tree' || $command eq 'edit_tree' ){
&create_tree;

View File

@ -40,7 +40,7 @@ foreach my $mode ('quickparse', 'express', 'rdf', 'flash',
}
if ($mode_count > 1) {
print "Content-type: text/plain\n\n";
print "Content-Type: text/plain; charset=utf-8\n\n";
print "Error: Only one mode type can be specified at a time.\n";
exit(0);
}

View File

@ -127,7 +127,7 @@ sub do_json($) {
my ($form_ref) = (@_);
my $tinderbox_data = tb_load_data($form_ref);
if (!$form_ref->{static}) {
print "Content-type: text/javascript\n";
print "Content-Type: text/javascript; charset=utf-8\n";
print "Content-Access-Control: allow <*>\n\n";
}
print "tinderbox_data";
@ -145,7 +145,7 @@ sub do_json($) {
sub print_page_head($$) {
my ($form_ref, $td) = (@_);
my $tree = $form_ref->{tree};
print "Content-type: text/html\n\n<HTML>\n" unless $form_ref->{static};
print "Content-Type: text/html; charset=utf-8\n\n<HTML>\n" unless $form_ref->{static};
use POSIX qw(strftime);
# Print time in format "YYYY-MM-DD HH:MM timezone"
@ -963,7 +963,7 @@ sub do_express($) {
my %express_form = %{$form_ref};
undef $express_form{express};
print "Content-type: text/html\nRefresh: 900\n\n<HTML>\n";
print "Content-Type: text/html; charset=utf-8\nRefresh: 900\n\n<HTML>\n";
my (%quickdata);
tb_loadquickparseinfo($tree, $form_ref->{maxdate}, \%quickdata);
@ -991,7 +991,7 @@ sub do_panel($) {
my %panel_form = %{$form_ref};
undef $panel_form{panel};
print "Content-type: text/html\n\n<HTML>\n" unless $form_ref->{static};
print "Content-Type: text/html; charset=utf-8\n\n<HTML>\n" unless $form_ref->{static};
my (%quickdata);
tb_loadquickparseinfo($tree, $form_ref->{maxdate}, \%quickdata);
@ -1038,7 +1038,7 @@ sub do_flash($) {
my ($form_ref) = (@_);
my $tree = &require_only_one_tree($form_ref->{tree});
print "Content-type: text/rdf\n\n" unless $form_ref->{static};
print "Content-Type: text/rdf; charset=utf-8\n\n" unless $form_ref->{static};
my (%quickdata);
tb_loadquickparseinfo($tree, $form_ref->{maxdate}, \%quickdata);
@ -1104,7 +1104,7 @@ sub do_flash($) {
sub do_quickparse($) {
my ($form_ref) = (@_);
print "Content-type: text/plain\n\n" unless $form_ref->{static};
print "Content-Type: text/plain; charset=utf-8\n\n" unless $form_ref->{static};
my $tree = $form_ref->{tree};
my @treelist = &make_tree_list();
my @requestedtreelist = split /,/, $tree;
@ -1135,7 +1135,7 @@ sub do_rdf($) {
my ($form_ref) = (@_);
my $tree = &require_only_one_tree($form_ref->{tree});
print "Content-type: text/plain\n\n";
print "Content-Type: text/plain; charset=utf-8\n\n";
my $mainurl = "http://$ENV{SERVER_NAME}$ENV{SCRIPT_NAME}?tree=$tree";
my $dirurl = $mainurl;
@ -1190,7 +1190,7 @@ sub do_hdml($) {
my ($form_ref) = (@_);
my $tree = &require_only_one_tree($form_ref->{tree});
print "Content-type: text/hdml\n\n" unless $form_ref->{static};
print "Content-Type: text/hdml; charset=utf-8\n\n" unless $form_ref->{static};
print q{<hdml public=true version=2.0 ttl=0>
<display title=Tinderbox>
@ -1225,7 +1225,7 @@ sub do_vxml($) {
my ($form_ref) = (@_);
my $tree = &require_only_one_tree($form_ref->{tree});
print "Content-type: text/vxml\n\n";
print "Content-Type: text/vxml; charset=utf-8\n\n";
print '<?xml version="1.0"?><!DOCTYPE vxml PUBLIC "-//Tellme Networks//Voice Markup Language 1.0//EN" "http://resources.tellme.com/toolbox/vxml-tellme.dtd">';
print '<vxml><form id="tinderbox"><block>';
@ -1292,7 +1292,7 @@ sub do_wml($) {
my ($form_ref) = (@_);
my $tree = &require_only_one_tree($form_ref->{tree});
print "Content-type: text/vnd.wap.wml\n";
print "Content-Type: text/vnd.wap.wml; charset=utf-8\n";
print "Pragma: No-Cache\n\n";
print '<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">';

View File

@ -138,7 +138,7 @@ else
############################################################
sub print_fragment {
print "Content-type: text/html\n";
print "Content-Type: text/html; charset=utf-8\n";
print "Last-Modified: " . gmtime($last_modified_time) . "\n";
print "Expires: " . gmtime($expires_time) . "\n";
print "\n";
@ -172,7 +172,7 @@ sub print_fragment {
}
sub print_header {
print "Content-type: text/html\n";
print "Content-Type: text/html; charset=utf-8\n";
print "Last-Modified: " . gmtime($last_modified_time) . "\n";
print "Expires: " . gmtime($expires_time) . "\n";
print "\n";

View File

@ -139,7 +139,7 @@ sub require_only_one_tree {
sub show_tree_selector {
print "Content-type: text/html\n\n";
print "Content-Type: text/html; charset=utf-8\n\n";
&EmitHtmlHeader("tinderbox");
@ -721,7 +721,7 @@ sub tb_check_password($$) {
require 'header.pl';
print "Content-type: text/html\n";
print "Content-Type: text/html; charset=utf-8\n";
print "Set-Cookie: tinderbox_password= ; path=/ ; "
." Expires = Sun, 1-Mar-2020 00:00:00 GMT\n";
print "\n";