RetconHTML-Craft icon indicating copy to clipboard operation
RetconHTML-Craft copied to clipboard

Run regex on image source

Open hisnameisjimmy opened this issue 7 years ago • 0 comments

Lets say I have the following (from old Wordpress): <img src="image-300x225.jpg"> But I want it to be: <img src="image.jpg">

Is this possible using Retcon? Could it be possible?

Right now if I run this: {{ entry.body|retconReplace('/\-[0-9]{1,4}\x[0-9]{1,4}/', '') }}

It outputs the correct thing, but also outputs everything inside 'body' as raw html rather than formatted.

hisnameisjimmy avatar Feb 16 '18 18:02 hisnameisjimmy