Closed dillonbailey closed 1 year ago
The workaround was to add a replace filter to strip the tags, but assuming not everyone will find this ideal:
{{ block.heading | replace('/<[^\\/>][^>]*><\\/[^>]+>/', '') | retconChange('p', 'h2') }}
Before implementing the workaround, the following error would be produced:
Based on the redactor field containing the following values in twig (without any filters):
<p dir="ltr"></p> <p>An interesting heading</p> <p></p>
Thanks for reporting that! Just published Retcon v. 2.6.1 with a fix.
Amazing! Thanks @mmikkel
The workaround was to add a replace filter to strip the tags, but assuming not everyone will find this ideal:
{{ block.heading | replace('/<[^\\/>][^>]*><\\/[^>]+>/', '') | retconChange('p', 'h2') }}
Before implementing the workaround, the following error would be produced:
Based on the redactor field containing the following values in twig (without any filters):