added $ escaping when outputting raw strings
authorfabien <fabien@93ef8e89-cb99-4229-a87c-7fa0fa45744b>
Thu, 15 Oct 2009 05:17:37 +0000 (05:17 +0000)
committerfabien <fabien@93ef8e89-cb99-4229-a87c-7fa0fa45744b>
Thu, 15 Oct 2009 05:17:37 +0000 (05:17 +0000)
git-svn-id: http://svn.twig-project.org/trunk@55 93ef8e89-cb99-4229-a87c-7fa0fa45744b

CHANGELOG
lib/Twig/Compiler.php

index fbb8ef9..cc1dd19 100644 (file)
--- 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
 
index 36de8d4..f91d9ba 100644 (file)
@@ -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;
   }