Ikrimah (may Allah have mercy on him) relates that Sayyiduna Ibn Abbas (may Allah be pleased with them both) was asked: "Do a dog, a donkey and a woman, by passing in front, break the prayer?" Ibn Abbas (may Allah be pleased with them both) said: "To Him ascend all good words, and righteous deeds He raises up" [Surah Fatir: 10]. These things do not break the prayer, but their passing is disliked.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3514