Fix escaping of img contents