Charlotte Brontë said this quote

Conventionality is not morality. Self-righteousness is not religion. To attack the first is not to assail the last.