Skip to content

Commit

Permalink
fix: Fixed a regression that happened when modernizing the `default_e…
Browse files Browse the repository at this point in the history
…scape` functionality ([#86](#86))
  • Loading branch information
khalwat committed Mar 27, 2024
1 parent bd0b66d commit b695763
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/variables/TypogrifyVariable.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,10 @@ private function normalizeText($text): string

if ($settings && $settings['default_escape'] === true) {
$twig = Craft::$app->getView()->getTwig();
$twig_escape_filter = $twig->getFilter('twig_escape_filter');
$text = $twig_escape_filter->getCallable()($twig, $text);
$twig_escape_filter = $twig->getFilter('e');
if ($twig_escape_filter) {
$text = $twig_escape_filter->getCallable()($twig, $text);
}
}

return $text;
Expand Down

0 comments on commit b695763

Please sign in to comment.