Reference: al-Bid’u wal-Muhdathaat wa maa laa Asla lahu – Page 152
Fataawa Islaamiyyah – Volume 2, Page 14
Question: Is it permissible to abandon attending a masjid wherein there occur many innovations?
Response: It is befitting for the Muslim to exert himself in wiping out these innovations as much as he is able to do so. However, if this becomes impossible, then he should abandon attending this particular masjid and pray in a masjid within which no innovations occur.
And with Allaah lies all success and may Allaah send prayers and salutations upon our Prophet (sal-Allaahu ‘alayhi wa sallam) and his family and his companions.