Is this some quirk with the preg_replace_callback function or something?
The full code is really complex but I'll post the specific problem here which I found after alot of debugging, a specific type of tag doesn't get matched at all, any ideas why this could be?
preg_replace_callback('/(?:<del>(.|
)*?<\/del>)|(?:<ins>(.|
)*?<\/ins>)|(?P<DOT>[\s\S])/', function($match) {
//does something and runs fully for every tag except the tag below
}
it matches other tags including html inside del tags but this sort of img tag isn't matched for some reason and the code just crashes at this point without calling the callback function at all. I checked using an online regex tester that this should match.
<del><img src="?tpl=img&url=1/68/thumb/Back-View-Of-Statue-Of-Liberty-With-Full-Moon.jpg" srcset="?tpl=img&url=1/68/thumb/Back-View-Of-Statue-Of-Liberty-With-Full-Moon.jpg 320w,?tpl=img&url=1/68/med/Back-View-Of-Statue-Of-Liberty-With-Full-Moon.jpg 480w,?tpl=img&url=1/68/large/Back-View-Of-Statue-Of-Liberty-With-Full-Moon.jpg 640w" sizes="(max-width:320px) 320px, (max-width:480px) 480px, 640px"></del>
Just asking incase anyone has a clue or could point me in the right direction.