From cd031c89ff38e56588cbccef259d6aecc34a73ae Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Fri, 6 Oct 2006 20:26:57 +0000 Subject: * added canonicalization of '\n' and '\t' to _tr(). git-svn-id: http://svn.openslx.org/svn/openslx/trunk@452 95ad53e4-c205-0410-b2fa-d234c58c8868 --- config-db/OpenSLX/Basics.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'config-db') diff --git a/config-db/OpenSLX/Basics.pm b/config-db/OpenSLX/Basics.pm index 128f9cfb..7021cb95 100644 --- a/config-db/OpenSLX/Basics.pm +++ b/config-db/OpenSLX/Basics.pm @@ -222,12 +222,16 @@ sub trInit # ------------------------------------------------------------------------------ sub _tr { - my $trKey = shift; + my $trOrig = shift; + + my $trKey = $trOrig; + $trKey =~ s[\n][\\n]g; + $trKey =~ s[\t][\\t]g; my $formatStr = $translations{$trKey}; if (!defined $formatStr) { # carp "Translation key '$trKey' not found."; - $formatStr = $trKey; + $formatStr = $trOrig; } return sprintf($formatStr, @_); } -- cgit v1.2.3-55-g7522