Upset stomach

Is Pepto Bismol or Imodium safe to take for diarrhea during breastfeeding?