You can do whatever you want to your heroine as long as it isn't rape. Once it is rape, the audience sees her as weak and dominated and it subverts her role as the agent of her own destiny. I don't mean this as an opinion, but description of the history of cinema. I can't imagine a heroine getting raped and the audience's interest in her story not dying with it. It shouldn't be that way, but it appears to be.

Perhaps some of this is why people are up in arms about the Sansa rape. Perhaps some of it is rape culture accusations. TBH I think the main culprit is shit writing. By the end of s4, we are given a Sansa who has accepted grim reality for what it is, who has indulged her capacity to manipulate. But come s5 and she reverts back to the same naive girl from the beginning. It isn't even that her being raped is a problem, but that her perceived understanding of the situation is the naivete she supposedly cast off in the end of s4.

We were led to believe that she had learned something. GRRM told us she learned something. But D&D decided she didn't. Both bookreaders and showwatchers are mad for ultimately the same reason: D&D changed the character of Sansa between seasons without telling us.

Maybe I shouldn't harp on D&D because if it were me, I'd either want to stick to the books perfectly, using 16 eps per season, or I'd want a complete overhaul that would include things like sinking Dorne beneath the sea and Dany scorching Meereen to the ground the day after she arrived.