Ticket 21962 -- adds cleanup_html flag to ErrorDict.as_json()