summaryrefslogtreecommitdiff
path: root/LedgerSMB/Template/ODS.pm
diff options
context:
space:
mode:
Diffstat (limited to 'LedgerSMB/Template/ODS.pm')
-rw-r--r--LedgerSMB/Template/ODS.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/LedgerSMB/Template/ODS.pm b/LedgerSMB/Template/ODS.pm
index 08df87a7..f3a37583 100644
--- a/LedgerSMB/Template/ODS.pm
+++ b/LedgerSMB/Template/ODS.pm
@@ -800,12 +800,15 @@ sub preprocess {
#XXX fix escaping function
return $rawvars if $type =~ /^LedgerSMB::Locale/;
+ return unless defined $rawvars;
if ( $type eq 'ARRAY' ) {
for (@{$rawvars}) {
push @{$vars}, preprocess( $_ );
}
} elsif (!$type) {
return escapeHTML($rawvars);
+ } elsif ($type eq 'SCALAR') {
+ return escapeHTML($$rawvars);
} else { # Hashes and objects
for ( keys %{$rawvars} ) {
$vars->{preprocess($_)} = preprocess( $rawvars->{$_} );