First time poster.
Haven't read all the responses re: how to handle this situation, and I can see that the topic is pretty old now (I actually thought it was a fresh topic originating from the "speech play" of Will Kassouf on the recently broadcast WSOP main event).
While I agree that the offensive player(s) deserve a beating for their behavior, I don't think it is the responsibility of the players at the table to administer this punishment. Maybe I'm a little bit of a woos because "taking it outside" would likely result in my own harm, being older, smaller, and not that fit
However, I do agree that the dealer and all the players at the table have a responsibility to curb such behavior. But I think the appropriate way to do so is to ask the poker room supervisor to come to the table, explain what happened, and let them handle it. In fact, the staff person taking you to the table and then offering you a table change when the inappropriate and offensive remarks were made, should have called the supervisor.
I know that they will likely only hand out a warning (and if they don't, that's a poker room I would less readily give my business), but it's step one on barring such a player from that poker room if there are repeated offenses.
I rely on the poker room staff to police these kinds of activities. There is way too much abusive talk, not just sexist, but all kinds, in poker rooms -- probably going back to the all-guys home games where perhaps this kind of behavior is permitted, perhaps even encouraged (although I would not enjoy a game like that most of the time). But even if that's in the least acceptable at a home game, these players need to learn how to behave in public.