Version 2.7.5
November 11, 2023
Fixed
- Fixed a PHP exception that could be thrown when using the
retconTransform
orretconSrcset
with Imager (not Imager X) installed
Version 2.7.4
October 19, 2023
Fixed
- Fixed an issue where the
retconSrcset
filter could use the wrong height value for the base64 placeholdersrc
attribute
Version 2.7.3
August 1, 2023
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.
Version 2.7.2
July 30, 2023
Fixed
- Fixed a regression introduced in Retcon 2.7.0, where Imager/Imager X would fail to transform external images, if the image URL contained a query string or was missing a file extension
Version 2.7.1
July 23, 2023
Fixed
- Fixed a PHP exception that could occur if Retcon operated on markup containing
<svg>
nodes - Fixed an issue where the
retconRemoveEmpty
filter could remove<svg>
,<iframe>
and<object>
tags
Changed
- Retcon now requires
symfony/dom-crawler
v. 4.4.0 or later - Retcon now requires
symfony/css-selector
v. 3.4.0 or later - Retcon now requires
masterminds/html5
v. 2.6.0 or later
Version 2.7.0.1
July 23, 2023
Fixed
- Fixed a regression introduced in 2.7.0, that could remove text content from nodes returned by the
retconOnly
filter
Version 2.7.0
July 22, 2023
Added
- Added a new
retconDimensions
filter, which can be used to set missingwidth
andheight
attributes for image nodes. - Added a new
$allowFilenameAsAltText
parameter to theretconAutoAlt
filter (defaulttrue
; will be defaultfalse
in Retcon 3.0). - Added
RetconTransformedImage
model.
Improved
- Improved support for CKEditor.
Changed
- The
autoAlt
filter now uses the nativealt
attribute if it has a value (Craft 4 only). - When using Imager (X) to transform images, the
retconTransform
andretconSrcset
filters now respect Imager'ssafeFileFormats
configuration setting, i.e. these filters will only attempt to transform jpgs, gifs and pngs out of the box, unless additional formats have been added in Imager's config file.
Fixed
- Fixed an issue where the
retconRemoveEmpty
filter would remove self-closing tags. - Fixed an issue where DOMDocument could wrap text nodes in
<p>
tags. - Fixed an issue where the
retconUnwrap
filter could unwrap root nodes. - Fixed an issue where the
autoAlt
filter was unable to retrieve alt value from the source asset. - Fixed an issue where the
retconAutoAlt
filter could use base64src
placeholders could be used for the alt value. - Fixed a PHP exception that would occur if using
retconTransform
orretconSrcset
with Imager X named transforms, if the named transform consisted of multiple transforms. Retcon will now use the first transform whenever Imager returns multiple transforms. - Fixed an issue where the
retconTransform
andretconSrcset
filters could upscale images even if Craft'supscaleImages
setting was set tofalse
.
Version 2.6.1
February 17, 2023
Fixed
- Fixed a PHP exception that would be thrown when using the
retconChange
filter on empty DOM nodes
Version 2.6.0
October 12, 2022
Changed
- Updated version constraints for the
symfony/dom-crawler
andsymfony/css-selector
dependencies, allowing their 6.0 packages
Version 2.5.0
August 23, 2022
Fixed
- Fixed a PHP exception that could occur when Retcon was unable to get the dimensions for an image being transformed
- Fixed a bug where the
retconTransform
filter would not apply missingwidth
andheight
attributes to theimg
tags being transformed
Added
- The
retconSrcset
filter now setsimg
tagswidth
andheight
attributes, if they are missing in the markup and Retcon is able to read out the dimensions
Version 2.4.3
August 17, 2022
Changed
- The
selector
,sizes
,base64src
,className
,attributeName
,imagerTransformDefaults
andimagerConfigOverrides
parameters are now nullable for theretconTransform
,retconLazy
andretconSrcset
filters
Version 2.4.2
April 27, 2022
Fixed
- Fixes an exception that would be thrown when setting
style
andclass
attributes with theretconAttr
filter, using values returned by Twig macros
Version 2.4.1
April 19, 2022
Fixed
- Reverted a breaking change in 2.4.0 where HTML entities in attribute values created with the
retconAttr
would be encoded
Changed
- Array values in HTML attributes created with the
retconAttr
filter are now always JSON-encoded, excepting theclass
andstyle
attributes, similarly to how the nativeattr
filter works
Version 2.4.0
April 18, 2022
Added
- Added support for Craft 4.0
- Added support for Imager X named transforms
- Added support for passing objects and arrays to the
|retconAttr
filter, similarly to the native|attr
filter
Fixed
- Fixed a couple of instances where Retcon could return unescaped HTML
Changed
- Retcon now requires Craft 3.7+
Version 2.3.0
October 22, 2021
Changed
- Update version dependencies for
symfony/dom-crawler
andsymfony/css-selector
.
Fixed
- Fixed docs (closes #28)
Version 2.2.3
May 5, 2020
Fixed
- Fixes an issue where Retcon wouldn't transform images with a
jpeg
file extension. Thanks @sweetroll 👍
Version 2.2.2
April 27, 2020
Fixed
- Fixes an issue where an exception could be thrown if Retcon was unable to read the extension for a transformed image. Thanks @lenvanessen! Fixes #31
Version 2.2.1
July 19, 2020
Fixed
- Fixes an issue where the
retconOnly
filter could throw an exception
Improved
- The
retconOnly
filter now returns an empty string if there are no nodes matching the selector
Changed
- Retcon now uses caret version range for the DomCrawler and CssSelector components
Version 2.2.0
July 19, 2020
Fixed
- Fixes an issue where using the
retconAttr
filter on<script>
tags could result in invalid HTML. Fixes #25 - Retcon no longer decodes HTML entities, fixing an issue where particular characters could result in mangled content output. Fixes #24
Version 2.1.0
March 8, 2020
Added
- Adds support for Imager X
Fixed
- Fixes an issue where the
retconAutoAlt
filter would always use the image filename for thealt
attribute - Fixes an issue where Retcon would throw an exception if the
retconLazy
filter was used on an<img>
tag with an invalidsrc
attribute
Version 2.0.12
November 9, 2018
Improved
- The
retconRemoveEmpty
will no longer remove<br/>
tags, unless the second parameter$removeBr
is set totrue
Version 2.0.11
October 8, 2018
Fixed
- Fixes an issue where the
retconOnly
filter could throw an exception if the HTML contained tags that weren't well-formed (e.g.img
tags that aren't explicitly closed). Thanks a lot @jcdarwin!
Version 2.0.10
August 17, 2018
Fixed
- Fixes an issue where Retcon would return escaped HTML if no matching selectors were found
Version 2.0.9
August 16, 2018
Fixed
- Fixes an issue where using Retcon on a string with only whitespace could throw an exception
Version 2.0.8
August 13, 2018
Fixed
- Various minor issues ironed out (thanks, Scrutinizer)
Improved
- The
overwrite
parameter for theattr()
method can now be set to a string'prepend'
, to prepend rather than append values to existing attributes
Version 2.0.7
August 7, 2018
Fixed
- Fixes an issue where Retcon could throw an exception if given a NULL value instead of a string (e.g. if a Redactor field had been added to a Field Layout, without re-saving the entries)
Version 2.0.6
August 5, 2018
Fixed
- Fixes an issue where Retcon would attempt to use Imager for transforms, even if Imager was not installed or deactivated
Version 2.0.5
July 28, 2018
Fixed
- Fixes a bug where the
transform
method would return an empty string if Retcon would fail to transform an image - Fixes various issues related to the project config file (i.e.
/config/retcon.php
) and plugin settings
Improved
- Improves image path handling for the
srcset
andtransform
methods
Version 2.0.4
July 25, 2018
Fixed
- Fixes a recently introduced regression error in the "retcon" catch-all method, affecting the "srcset" method and others.
Version 2.0.3
July 21, 2018
Fixed
- Retcon no longers attempt to decode quote entities, to fix an issue where serialized data in HTML attributes were getting butchered
Version 2.0.2
July 18, 2018
Fixed
- Various minor issues fixed
Version 2.0.1
July 18, 2018
Fixed
- Fixes various issues with the
retcon
catch-all filter - Fixes an issue where Retcon would entity encode HTML tags when no nodes matched the given selector for methods such
as
srcset
,transform
and others - Fixes an issue where Retcon would entity encode non-breaking spaces
Version 2.0.0
July 18, 2018
Added
- New filter
retconRemoveEmpty
added, which will remove empty DOM nodes (e.g.<p>
tags without text content)
Improved
- Selectors are much, much more flexible (almost all CSS selectors work, which means that Retcon is basically jQuery now!) due to the magic of Symfony's DomCrawler component
- Full HTML5 support
- The
retconAutoAlt
filter will use the Asset'stitle
for thealt
attribute, if Retcon is fed markup with Craft CMS reference tags - The
retconTransform
,retconLazy
andretconSrcSet
filters now take an additional parameter –selector
(defaults to'img'
)
Version 1.0.1
June 7, 2018
Improved
- Adds support for the
limit
parameter in the "replace" filter (preg_replace
wrapper)
Version 1.0.0-beta1
March 5, 2018
Added
- Beta release