diff options
Diffstat (limited to 'LedgerSMB/Template/HTML.pm')
-rwxr-xr-x | LedgerSMB/Template/HTML.pm | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/LedgerSMB/Template/HTML.pm b/LedgerSMB/Template/HTML.pm index 8e610e26..62834f70 100755 --- a/LedgerSMB/Template/HTML.pm +++ b/LedgerSMB/Template/HTML.pm @@ -1,3 +1,4 @@ + =head1 NAME LedgerSMB::Template::HTML Template support module for LedgerSMB @@ -29,29 +30,31 @@ use CGI; package LedgerSMB::Template::HTML; sub get_template { - my $name = shift; - return "${name}.html"; + my $name = shift; + return "${name}.html"; } sub preprocess { - my $rawvars = shift; - my $vars; - my $type = ref $rawvars; - -#XXX fix escaping function - if ($type eq 'ARRAY') { - } elsif ($type eq 'HASH') { - for (keys %{$rawvars}) { - $vars->{$_} = preprocess($rawvars[$_]); - } - } else { - return CGI::escapeHTML($rawvars); - } + my $rawvars = shift; + my $vars; + my $type = ref $rawvars; + + #XXX fix escaping function + if ( $type eq 'ARRAY' ) { + } + elsif ( $type eq 'HASH' ) { + for ( keys %{$rawvars} ) { + $vars->{$_} = preprocess( $rawvars[$_] ); + } + } + else { + return CGI::escapeHTML($rawvars); + } } sub postprocess { - my $parent = shift; - return; + my $parent = shift; + return; } 1; |