Version 2.6.1
February 17, 2023
Fixed
- Fixes 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 encodedChanged
- 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 exceptionImproved
- The
retconOnly
filter now returns an empty string if there are no nodes matching the selectorChanged
- 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