From 9cfbe3d3dd471873dbc1dfdb808950de59671b1f Mon Sep 17 00:00:00 2001 From: fabien Date: Thu, 5 Nov 2009 17:06:00 +0000 Subject: [PATCH] fixed \ usage in a HTML string git-svn-id: http://svn.twig-project.org/trunk@111 93ef8e89-cb99-4229-a87c-7fa0fa45744b --- lib/Twig/Compiler.php | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/Twig/Compiler.php b/lib/Twig/Compiler.php index f91d9ba..95d7f00 100644 --- a/lib/Twig/Compiler.php +++ b/lib/Twig/Compiler.php @@ -113,7 +113,7 @@ class Twig_Compiler implements Twig_CompilerInterface */ public function string($value) { - $this->source .= sprintf('"%s"', addcslashes($value, "\t\"\$")); + $this->source .= sprintf('"%s"', str_replace('\\\n', "\n", addcslashes($value, "\t\"\$\\"))); return $this; } -- 1.7.2.5