Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) said: "Ablution (wudu) is broken only by what comes out, not by what goes in; and the fast is broken by what goes in, not by what comes out."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 9205