cleaning up caption markup