Sanitize input to database