Make sanitize() more compact.