sanitize mid