If it's genuinely hurtful and ignorant, why should you ignore/brush it off? Your values are being violated. Confront it. Communicate your distress. You can give benefit of the doubt while also asking the offender why they said such things.
Maybe you'll find you misread the situations. Or you'll find that they didn't mean ill at all. Or maybe they did because they're ignorant and you can help them learn.