clean up mhtml code