From: fabien Date: Tue, 22 Dec 2009 07:06:39 +0000 (+0000) Subject: fixed escaping when getattr nodes are used X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=5f049939efcae56a65da606255223f61a6248a2c;p=konrad%2Ftwig.git fixed escaping when getattr nodes are used git-svn-id: http://svn.twig-project.org/trunk@194 93ef8e89-cb99-4229-a87c-7fa0fa45744b --- diff --git a/lib/Twig/NodeTransformer/Escaper.php b/lib/Twig/NodeTransformer/Escaper.php index 9fbcd27..646a04d 100644 --- a/lib/Twig/NodeTransformer/Escaper.php +++ b/lib/Twig/NodeTransformer/Escaper.php @@ -63,7 +63,7 @@ class Twig_NodeTransformer_Escaper extends Twig_NodeTransformer } } } - elseif (!$expression instanceof Twig_Node_Expression_Name) + elseif (!$expression instanceof Twig_Node_Expression_GetAttr && !$expression instanceof Twig_Node_Expression_Name) { // don't escape if the node is not a variable return $node; diff --git a/test/unit/integrationTest.php b/test/unit/integrationTest.php index 9e3f2a3..2ac44d7 100644 --- a/test/unit/integrationTest.php +++ b/test/unit/integrationTest.php @@ -51,7 +51,7 @@ class TestExtension extends Twig_Extension } } -$t = new LimeTest(60); +$t = new LimeTest(61); $fixturesDir = realpath(dirname(__FILE__).'/../fixtures/'); foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($fixturesDir), RecursiveIteratorIterator::LEAVES_ONLY) as $file)