From e482038098f6b55b60b2003223d9949cea1b15d8 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 7 Nov 2010 09:58:28 +0100 Subject: [PATCH] changed how nl2br is implemented in tests to better reflect how it should be done in userland code --- test/Twig/Tests/integrationTest.php | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/test/Twig/Tests/integrationTest.php b/test/Twig/Tests/integrationTest.php index b0405a3..dcaccc5 100644 --- a/test/Twig/Tests/integrationTest.php +++ b/test/Twig/Tests/integrationTest.php @@ -108,8 +108,7 @@ class TestExtension extends Twig_Extension public function nl2br($env, $value, $sep = '
') { - $value = htmlspecialchars($value, ENT_QUOTES, $env->getCharset()); - return str_replace("\n", $sep."\n", $value); + return str_replace("\n", $sep."\n", twig_escape_filter($env, $value, 'html')); } public function getName() -- 1.7.2.5