diff options
Diffstat (limited to 'LedgerSMB/Template')
-rwxr-xr-x | LedgerSMB/Template/LaTeX.pm | 6 |
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->{$_}); |