fix captions for galleries and images

Gallery captions we have to parse
images captions we have to replace links