Commit 86bc1cef authored by xjm's avatar xjm

Issue #2567139 by Cottser, stefan.r, joelpittet: Twig autoescape default...

Issue #2567139 by Cottser, stefan.r, joelpittet: Twig autoescape default strategy deprecation error triggered on every page load
parent 8b3b8c67
......@@ -82,7 +82,7 @@ public function __construct($root, CacheBackendInterface $cache, $twig_extension
'auto_reload' => NULL,
);
// Ensure autoescaping is always on.
$options['autoescape'] = TRUE;
$options['autoescape'] = 'html';
$this->loader = $loader;
parent::__construct($this->loader, $options);
......
......@@ -33,7 +33,7 @@ public function testEscaping($template, $expected) {
$twig = new \Twig_Environment(NULL, array(
'debug' => TRUE,
'cache' => FALSE,
'autoescape' => TRUE,
'autoescape' => 'html',
'optimizations' => 0
));
$twig->addExtension((new TwigExtension($renderer))->setUrlGenerator($this->getMock('Drupal\Core\Routing\UrlGeneratorInterface')));
......@@ -113,7 +113,7 @@ public function testSafeStringEscaping() {
$twig = new \Twig_Environment(NULL, array(
'debug' => TRUE,
'cache' => FALSE,
'autoescape' => TRUE,
'autoescape' => 'html',
'optimizations' => 0
));
$twig_extension = new TwigExtension($renderer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment