XF 1.5 How to fix IPB embedded gallery pictures in posts which are broken after import


When I migrated from IPB to XF, several posts now have broken images. I did import the gallery, and all pictures copied over.

For example, where there used to be a picture, this code now shows:

Is it possible to fix this with a script?