diff options
author | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-06-22 19:04:24 +0000 |
---|---|---|
committer | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-06-22 19:04:24 +0000 |
commit | bfa1a35ab8b449de5047bbbf7a85cbd0cc4e20a1 (patch) | |
tree | 25885edbe21b05839cacbe8b3249017c79736c23 /LedgerSMB/Template/HTML.pm | |
parent | eb21ae5da75a6d71afa8edc894b85701553f0751 (diff) |
Template handling adjustments
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1308 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB/Template/HTML.pm')
-rwxr-xr-x | LedgerSMB/Template/HTML.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/LedgerSMB/Template/HTML.pm b/LedgerSMB/Template/HTML.pm index d02000a9..0ca82bcc 100755 --- a/LedgerSMB/Template/HTML.pm +++ b/LedgerSMB/Template/HTML.pm @@ -42,6 +42,7 @@ package LedgerSMB::Template::HTML; use Error qw(:try); use CGI; use Template; +use LedgerSMB::Template::TTI18N; sub get_template { my $name = shift; @@ -54,6 +55,7 @@ sub preprocess { my $type = ref $rawvars; #XXX fix escaping function + return $rawvars if $type =~ /^LedgerSMB::Locale/; if ( $type eq 'ARRAY' ) { for (@{$rawvars}) { push @{$vars}, preprocess( $_ ); @@ -83,7 +85,9 @@ sub process { }) || throw Error::Simple Template->error(); if (not $template->process( get_template($parent->{template}), - $cleanvars, "$parent->{outputfile}.html", binmode => ':utf8')) { + {%$cleanvars, %$LedgerSMB::Template::TTI18N::ttfuncs, + 'escape' => \&preprocess}, + "$parent->{outputfile}.html", binmode => ':utf8')) { throw Error::Simple $template->error(); } $parent->{mimetype} = 'text/html'; |