--- test/html-webhacc/cc.cgi 2007/07/15 16:39:10 1.9
+++ test/html-webhacc/cc.cgi 2007/07/16 08:38:48 1.10
@@ -80,6 +80,8 @@
if ($input->{media_type} eq 'text/html') {
require Encode;
require Whatpm::HTML;
+
+ $input->{charset} ||= 'ISO-8859-1'; ## TODO: for now.
my $t = Encode::decode ($input->{charset}, $input->{s});
@@ -87,8 +89,7 @@
Parse Errors
-
-];
+];
push @nav, ['#parse-errors' => 'Parse Error'];
my $onerror = sub {
@@ -115,8 +116,7 @@
Whatpm::HTML->parse_string ($t => $doc, $onerror);
}
- print STDOUT qq[
-
+ print STDOUT qq[
];
@@ -493,7 +493,9 @@
{
if (defined $Msg->{$type}) {
my $msg = $Msg->{$type}->[1];
- $msg =~ s/\$([0-9]+)/defined $arg[$1] ? htescape ($arg[$1]) : '(undef)'/ge;
+ $msg =~ s{\$([0-9]+)}{
+ defined $arg[$1] ? htescape ($arg[$1]) : '(undef)';
+ }ge;
return ($Msg->{$type}->[0], $msg);
} elsif ($type =~ s/:([^:]*)$//) {
unshift @arg, $1;
@@ -667,4 +669,4 @@
=cut
-## $Date: 2007/07/15 16:39:10 $
+## $Date: 2007/07/16 08:38:48 $