Skip to content

Commit

Permalink
Merge branch 'release/5.0.0-beta.2' into v5
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Mar 27, 2024
2 parents e117864 + 3d590c0 commit c938b2d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Typogrify Changelog

## 5.0.0-beta.2 - 2024.03.27
### Fixed
* Fixed a regression that happened when modernizing the `default_escape` functionality ([#86](https://github.com/nystudio107/craft-typogrify/issues/86))

## 5.0.0-beta.1 - 2024.03.27
### Added
* Initial Craft CMS 5 compatibility
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nystudio107/craft-typogrify",
"description": "Typogrify prettifies your web typography by preventing ugly quotes and 'widows' and more",
"type": "craft-plugin",
"version": "5.0.0-beta.1",
"version": "5.0.0-beta.2",
"keywords": [
"craft",
"cms",
Expand Down
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 c938b2d

Please sign in to comment.