From 3f610786bf46bab1032f0f4436f4597355a03ecd Mon Sep 17 00:00:00 2001 From: Luis de Benito Date: Thu, 10 Oct 2024 13:05:01 +0200 Subject: [PATCH] Changed escaper static called for its runtime instance --- src/InterNations/Twig/DataGridExtension.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/InterNations/Twig/DataGridExtension.php b/src/InterNations/Twig/DataGridExtension.php index 7ed48701..6c328027 100644 --- a/src/InterNations/Twig/DataGridExtension.php +++ b/src/InterNations/Twig/DataGridExtension.php @@ -20,6 +20,7 @@ use Twig\TemplateWrapper; use Twig\TwigFunction; use Twig\Extension\AbstractExtension; +use Twig\Runtime\EscaperRuntime; class DataGridExtension extends AbstractExtension { @@ -178,7 +179,8 @@ public function getGridCell(Environment $environment, array $context, Column $co ); } - return $environment->getFilter('escape')->getCallable()($environment, $value, 'html', null, true); + $escaper = $environment->getRuntime(EscaperRuntime::class); + return $escaper->escape($value, 'html', null,true); } public function getGridFilter(Environment $environment, array $context, Column $column, Grid $grid): string