Haywood's Fantomina makes a subtle reference to the idea of convents being hotbeds of perversion at the end of the novel when the protagonist is sent away to a continental nunnery. I've sometimes wondered if Shakespeare's "Get thee to a nunnery" is also a reference, but I've read that "nunnery" was also slang for a common brothel, so who knows.
I’m reminded of Boccacio’s Decameron (1353!) —
from the deaf gardener at the convent, to “putting the devil back into hell” to the Mother Superior caught with her lover’s underwear on her head by mistake...