summaryrefslogtreecommitdiff
path: root/LedgerSMB/Template
diff options
context:
space:
mode:
Diffstat (limited to 'LedgerSMB/Template')
-rwxr-xr-xLedgerSMB/Template/LaTeX.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/LedgerSMB/Template/LaTeX.pm b/LedgerSMB/Template/LaTeX.pm
index 973cb724..ea04bb80 100755
--- a/LedgerSMB/Template/LaTeX.pm
+++ b/LedgerSMB/Template/LaTeX.pm
@@ -77,8 +77,10 @@ sub preprocess {
$vars = $rawvars;
}
#XXX Fix escaping
- $vars =~ s/([&\$\\_<>~^#\%\{\}])/\\$1/g;
- $vars =~ s/"(.*)"/``$1''/gs;
+ if (defined $vars){
+ $vars =~ s/([&\$\\_<>~^#\%\{\}])/\\$1/g;
+ $vars =~ s/"(.*)"/``$1''/gs;
+ }
} else {
for ( keys %{$rawvars} ) {
$vars->{$_} = preprocess($rawvars->{$_});