Skip to content

Commit

Permalink
Merge branch 'release/1.1.22' into v1
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Mar 27, 2024
2 parents 873cf40 + abb8c3c commit a87ffd4
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

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

## 1.1.21 - 2024.03.27
### Added
* Add `phpstan` and `ecs` code linting
Expand Down
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": "1.1.21",
"version": "1.1.22",
"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['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 a87ffd4

Please sign in to comment.