update sanitize to process attributes