Skip to content

Commit

Permalink
Fix issue where Retcon could return unparsed reference tags. Bump to …
Browse files Browse the repository at this point in the history
…2.7.3. Fixes #63
  • Loading branch information
mmikkel committed Aug 1, 2023
1 parent 852289d commit 81fe0d5
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 88 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Retcon Changelog

## 2.7.3 - 2023-08-01

### Fixed

- Fixed a regression introduced in Retcon 2.7.0, where Retcon would return unparsed reference tags from Redactor/CKEditor output, in cases where there were no nodes matching the given selector.

## 2.7.2 - 2023-07-30

### Fixed
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": "mmikkel/retcon",
"description": "Powerful Twig filters for mutating and querying HTML",
"type": "craft-plugin",
"version": "2.7.2",
"version": "2.7.3",
"keywords": [
"craft",
"cms",
Expand Down
3 changes: 3 additions & 0 deletions src/helpers/RetconHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ class RetconHelper
*/
public static function getHtmlFromParam($value): ?string
{
if (empty($value)) {
return null;
}
if ($value instanceof RedactorFieldData || $value instanceof HtmlFieldData) {
$html = $value->getRawContent();
} else {
Expand Down
Loading

0 comments on commit 81fe0d5

Please sign in to comment.