Improve error messages for bad uploads
Fix escaping of HTML characters in CSV download