Fix escaping of images and URLs