Depends if it's a tummy bug or just general pregnancy symptom? If it's a tummy bug then you're better off leaving it be as trying to block yourself back up will only make the problem worse. If you think it's just pregnancy / diet related then there are a couple of things you could try....
Unripe bananas are good for diarrhea, the slightly greenish ones. Don't eat over ripe ones (with brown spots) as they will make it worse. Wholemeal bread, rice, pasta etc should help too. All Bran cereal pretty good too.
Have you been drinking milk? I find that my stomach is less tolerant of dairy when I am pregnant so have to go easy on milk, I usually switch to almond or soya where possible. Cows milk gives me the runs!