Skip to content

Commit

Permalink
Changed escaper static called for its runtime instance
Browse files Browse the repository at this point in the history
  • Loading branch information
ldebenito committed Oct 10, 2024
1 parent 9d89076 commit 3f61078
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/InterNations/Twig/DataGridExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use Twig\TemplateWrapper;
use Twig\TwigFunction;
use Twig\Extension\AbstractExtension;
use Twig\Runtime\EscaperRuntime;

class DataGridExtension extends AbstractExtension
{
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3f61078

Please sign in to comment.