(MAIN-2717) Properly escape title attribute in image thumbnails

@michalroszka