From: Moritz Bunkus Date: Tue, 23 Jan 2007 13:24:08 +0000 (+0000) Subject: Weitere Sonderzeichen escapen. X-Git-Tag: release-2.4.2~264 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=fedfcc676894b8dc44f74b97cb53ed6e3d97f748;p=kivitendo-erp.git Weitere Sonderzeichen escapen. --- diff --git a/SL/Template.pm b/SL/Template.pm index 18b44d069..e4e940ba2 100644 --- a/SL/Template.pm +++ b/SL/Template.pm @@ -91,7 +91,7 @@ sub format_string { '', '&', quotemeta("\n"), '"', '\$', '%', '_', '#', quotemeta('^'), - '{', '}', '<', '>', '£', "\r", '±', + '{', '}', '<', '>', '£', "\r", '±', '\xe1', ], quotemeta("\\") => '\\textbackslash ', '' => '', @@ -108,6 +108,7 @@ sub format_string { '£' => '\pounds ', "\r" => "", '±' => '$\pm$', + '\xe1' => '$\bullet$', quotemeta('^') => '\^\\', quotemeta("\n") => '\newline ' ); @@ -125,6 +126,8 @@ sub format_string { $variable =~ s/\$\<\$${key}\$\>\$(.*?)\$<\$\/${key}\$>\$/\\${new}\{$1\}/gi; } + $variable =~ s/[\x00-\x1f]//g; + return $variable; }