Version 2.8.2
October 21, 2024
Fixed
- Fixed an issue where Retcon would convert UTF-8 non-breaking spaces to HTML entities, preventing filters like
retconRemoveEmptyfrom working correctly in all cases #70
Version 2.8.1
July 3, 2024
Fixed
- Fixed a PHP 7 compatibility issue introduced in Retcon 2.8.0, affecting Craft 3 installs using the
retconSrcsetorretconTransformfilters. #69
Version 2.8.0
June 28, 2024
Improved
- Improves support for Imager X named transforms for the
retconSrcsetfilter. #69
Version 2.7.5
November 11, 2023
Fixed
- Fixed a PHP exception that could be thrown when using the
retconTransformorretconSrcsetwith Imager (not Imager X) installed
Version 2.7.4
October 19, 2023
Fixed
- Fixed an issue where the
retconSrcsetfilter could use the wrong height value for the base64 placeholdersrcattribute
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
retconRemoveEmptyfilter could remove<svg>,<iframe>and<object>tags
Changed
- Retcon now requires
symfony/dom-crawlerv. 4.4.0 or later - Retcon now requires
symfony/css-selectorv. 3.4.0 or later - Retcon now requires
masterminds/html5v. 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
retconOnlyfilter
Version 2.7.0
July 22, 2023
Added
- Added a new
retconDimensionsfilter, which can be used to set missingwidthandheightattributes for image nodes. - Added a new
$allowFilenameAsAltTextparameter to theretconAutoAltfilter (defaulttrue; will be defaultfalsein Retcon 3.0). - Added
RetconTransformedImagemodel.
Improved
- Improved support for CKEditor.
Changed
- The
autoAltfilter now uses the nativealtattribute if it has a value (Craft 4 only). - When using Imager (X) to transform images, the
retconTransformandretconSrcsetfilters now respect Imager'ssafeFileFormatsconfiguration 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
retconRemoveEmptyfilter would remove self-closing tags. - Fixed an issue where DOMDocument could wrap text nodes in
<p>tags. - Fixed an issue where the
retconUnwrapfilter could unwrap root nodes. - Fixed an issue where the
autoAltfilter was unable to retrieve alt value from the source asset. - Fixed an issue where the
retconAutoAltfilter could use base64srcplaceholders could be used for the alt value. - Fixed a PHP exception that would occur if using
retconTransformorretconSrcsetwith 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
retconTransformandretconSrcsetfilters could upscale images even if Craft'supscaleImagessetting was set tofalse.
Version 2.6.1
February 17, 2023
Fixed
- Fixed a PHP exception that would be thrown when using the
retconChangefilter on empty DOM nodes
Version 2.6.0
October 12, 2022
Changed
- Updated version constraints for the
symfony/dom-crawlerandsymfony/css-selectordependencies, 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
retconTransformfilter would not apply missingwidthandheightattributes to theimgtags being transformed
Added
- The
retconSrcsetfilter now setsimgtagswidthandheightattributes, 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,imagerTransformDefaultsandimagerConfigOverridesparameters are now nullable for theretconTransform,retconLazyandretconSrcsetfilters
Version 2.4.2
April 27, 2022
Fixed
- Fixes an exception that would be thrown when setting
styleandclassattributes with theretconAttrfilter, 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
retconAttrwould be encoded
Changed
- Array values in HTML attributes created with the
retconAttrfilter are now always JSON-encoded, excepting theclassandstyleattributes, similarly to how the nativeattrfilter 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
|retconAttrfilter, similarly to the native|attrfilter
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-crawlerandsymfony/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
jpegfile 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
retconOnlyfilter could throw an exception
Improved
- The
retconOnlyfilter 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
retconAttrfilter 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
retconAutoAltfilter would always use the image filename for thealtattribute - Fixes an issue where Retcon would throw an exception if the
retconLazyfilter was used on an<img>tag with an invalidsrcattribute
Version 2.0.12
November 9, 2018
Improved
- The
retconRemoveEmptywill no longer remove<br/>tags, unless the second parameter$removeBris set totrue
Version 2.0.11
October 8, 2018
Fixed
- Fixes an issue where the
retconOnlyfilter could throw an exception if the HTML contained tags that weren't well-formed (e.g.imgtags 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
overwriteparameter 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
transformmethod 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
srcsetandtransformmethods
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
retconcatch-all filter - Fixes an issue where Retcon would entity encode HTML tags when no nodes matched the given selector for methods such
as
srcset,transformand others - Fixes an issue where Retcon would entity encode non-breaking spaces
Version 2.0.0
July 18, 2018
Added
- New filter
retconRemoveEmptyadded, 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
retconAutoAltfilter will use the Asset'stitlefor thealtattribute, if Retcon is fed markup with Craft CMS reference tags - The
retconTransform,retconLazyandretconSrcSetfilters now take an additional parameter –selector(defaults to'img')
Version 1.0.1
June 7, 2018
Improved
- Adds support for the
limitparameter in the "replace" filter (preg_replacewrapper)
Version 1.0.0-beta1
March 5, 2018
Added
- Beta release