From: fabien Date: Thu, 5 Nov 2009 17:06:00 +0000 (+0000) Subject: fixed \ usage in a HTML string X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=9cfbe3d3dd471873dbc1dfdb808950de59671b1f;p=konrad%2Ftwig.git fixed \ usage in a HTML string git-svn-id: http://svn.twig-project.org/trunk@111 93ef8e89-cb99-4229-a87c-7fa0fa45744b --- 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; }