From 5f049939efcae56a65da606255223f61a6248a2c Mon Sep 17 00:00:00 2001 From: fabien Date: Tue, 22 Dec 2009 07:06:39 +0000 Subject: [PATCH] fixed escaping when getattr nodes are used git-svn-id: http://svn.twig-project.org/trunk@194 93ef8e89-cb99-4229-a87c-7fa0fa45744b --- lib/Twig/NodeTransformer/Escaper.php | 2 +- test/unit/integrationTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) -- 1.7.2.5