diff --git a/core/lib/Drupal/Core/Template/TemplateWithoutErrorHandling.php b/core/lib/Drupal/Core/Template/TemplateWithoutErrorHandling.php new file mode 100644 index 0000000..812e4cc --- /dev/null +++ b/core/lib/Drupal/Core/Template/TemplateWithoutErrorHandling.php @@ -0,0 +1,22 @@ +doDisplay($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks)); + } + +} diff --git a/core/lib/Drupal/Core/Template/TwigEnvironment.php b/core/lib/Drupal/Core/Template/TwigEnvironment.php index dc7de16..67f7994 100644 --- a/core/lib/Drupal/Core/Template/TwigEnvironment.php +++ b/core/lib/Drupal/Core/Template/TwigEnvironment.php @@ -58,7 +58,9 @@ public function __construct($root, CacheBackendInterface $cache, \Twig_LoaderInt 'cache' => TRUE, 'debug' => FALSE, 'auto_reload' => NULL, + 'base_template_class' => 'Drupal\Core\Template\TemplateWithoutErrorHandling', ); + // Ensure autoescaping is always on. $options['autoescape'] = TRUE;