Interestingly this is a theme one can find in Soufi literature: in the Conference of the Birds, from Persian author, and precursor to Rumi, Farid Ud-din Attar, there is the story of Archangel Gabriel seeing Allah deeply absorbed in listening to the prayer of a human. But when Gabriel searches, he cannot find who is this saint. Only when he finally searches outside of the Muslim world does he see that the prayer comes from an "Image Worshiper" (a sin in Islamic doctrine). What I get from this fable is that though the author recognizes the possibility for a human not exposed to the "true religion" to be of spiritual value, it can only happen if this human has a strong religious attitude of worship, prayer and devotion - he might pray to the "wrong" god, but with the right attitude. Which is kind of the opposite of taking out the religious elements - you might replace Allah by "the One" or "God" if this helps you resonate, but not dilute it in a vague formula such as "that which is good" or similar examples as described in the article.