From: Moritz Bunkus Date: Mon, 27 Dec 2010 12:52:28 +0000 (+0100) Subject: JavaScript-String-Escaping X-Git-Tag: release-2.6.2beta1~64^2~23 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=9796c91fd60477b461fa5cdfa9292fdb9e86ef02;p=kivitendo-erp.git JavaScript-String-Escaping --- diff --git a/SL/Template/Plugin/L.pm b/SL/Template/Plugin/L.pm index f776af85c..844c88dd2 100644 --- a/SL/Template/Plugin/L.pm +++ b/SL/Template/Plugin/L.pm @@ -21,6 +21,12 @@ sub _H { return $::locale->quote_special_chars('HTML', $string); } +sub _J { + my $string = "" . shift; + $string =~ s/\"/\\\"/g; + return $string; +} + sub _hashify { return (@_ && (ref($_[0]) eq 'HASH')) ? %{ $_[0] } : @_; }