Sayyiduna Abu Hurayrah (may Allah be pleased with him) says that the Messenger of Allah (peace and blessings be upon him) said: "Allah, the Lord of Might, has pardoned my Ummah the thoughts of their hearts, so long as they do not speak of them with their tongues or act upon them."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الخلع والطلاق / 15053