Saeed bin Jubair narrates: It was asked from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) about a man who commits a forbidden act, and then afterwards wants to marry. So Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) said: "His first act was adultery, but the second act will be considered marriage."
Hadith Referenceسنن الدارقطني / كتاب النكاح / 3681
Hadith Takhrij«أخرجه سعيد بن منصور فى ((سننه)) برقم: 886، 887، والبيهقي فى((سننه الكبير)) برقم: 13989، والدارقطني فى ((سننه)) برقم: 3681، وعبد الرزاق فى ((مصنفه)) برقم: 12785،وابن أبى شيبة فى ((مصنفه)) برقم: 17046، 17060، 17063»