There have been so many instances where rapists were have been set free or the woman has been punished because she was in the company of strangers. Half the rape cases in all Muslim countries are handled this way.
In our own country a religious court forced a man to separate with his wife because she had been raped by her father-in-law, and because she had sexual relations with him she was equal to her husband's mother.