Whatever the nursing mother eat will be secreted in her milk, but in insignificant quantities. Generally if the mother tolerates a particular food item well the baby also tolerates it well.
A normal well-nourished mother secretes about 500ml of milk daily for the first 6 months to one year and after that the quantity slowly comes down. Whereas an undernourished mother’s milk is insufficient in fats and vitamins and inadequate for the baby also.
Eating fishes and vegetables contaminated with pesticides may cause problems in the baby because of their secretion in the milk. Eating spices, condiments, chocolates, onions, tomatoes may cause loose stools in the babies. But the problems are plenty in the baby of a mother who smokes, drinks alcohol and abuses the drugs. A almost all the drugs are excreted in the breast milk and they will have their effect on the baby.
For medical reasons if the mother has to take certain drugs like anticoagulants, anti-cancer drugs, anti-thyroid drugs, radioactive drugs, purgatives etc. she has to stop feeding her baby as long as she is on those drugs.