-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
P tags around images function #20
Comments
I'm able to reproduce this. I'll look at some other regex options and update in the next release. |
Great, look forward to it. |
I've decided to remove this function for now. I'm not crazy about maintaining regexes, and I think trying to strip these tags out after the fact is the wrong approach. I've opened a ticket, requesting a filter on Thanks. |
Will do, thanks Cooper. |
Hi Cooper, your preg_replace does not seem to work:
return preg_replace( '/
\s_(<a .>)?\s(<img ._ />)\s_(</a>)?\s_</p>/iU', '\1\2\3', $content );
Yet this one does for me:
return preg_replace('/
\s_?(<a ._?><img.?></a>|<img.?>)?\s*</p>/s', '\1\2\3', $content);
Wondered if this was a bug - are you having problems with the original? Could you also offer any advice on the validity of the syntax in my suggested replacement?
Ref: http://atg2.hostfortyfive.co.uk/about
Thanks
The text was updated successfully, but these errors were encountered: