From: fabien Date: Thu, 15 Oct 2009 05:17:37 +0000 (+0000) Subject: added $ escaping when outputting raw strings X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=d11a3307eaa5a887130f9b8589893ea62fd46907;p=konrad%2Ftwig.git added $ escaping when outputting raw strings git-svn-id: http://svn.twig-project.org/trunk@55 93ef8e89-cb99-4229-a87c-7fa0fa45744b --- diff --git a/CHANGELOG b/CHANGELOG index fbb8ef9..cc1dd19 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,6 @@ * 0.9.2-DEV + * added $ escaping when outputting raw strings * enhanced some error messages to ease debugging * fixed empty cache files when the template contains an error diff --git a/lib/Twig/Compiler.php b/lib/Twig/Compiler.php index 36de8d4..f91d9ba 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"', addcslashes($value, "\t\"\$")); return $this; }