JavaScript-Plugin: Carriage returns escapen
authorMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 15 Jul 2013 14:34:45 +0000 (16:34 +0200)
committerJan Büren <jan@kivitendo-premium.de>
Thu, 18 Jul 2013 07:01:11 +0000 (09:01 +0200)
SL/Template/Plugin/JavaScript.pm

index 241ea0e..2e05bed 100644 (file)
@@ -24,6 +24,7 @@ sub escape {
   $text =~ s|\\|\\\\|g;
   $text =~ s|\"|\\\"|g;
   $text =~ s|\n|\\n|g;
+  $text =~ s|\r|\\r|g;
 
   return $text;
 }