Safer drugs can be used if necessary, but those medical conditions still need to be treated. They'll take it every other day, or half as much. That's not wise. The risks of a drug have to be weighed against its benefits. For example, some epilepsy drugs are known to cause birth defects, but an epileptic seizure can cause brain damage to the fetus.
Most experts agree that the benefits of medication in such cases outweigh the risks.
Other drugs, however, are not so clear-cut. For a baby to be healthy, it needs a mother who's healthy. However, most drugs have not been tested scientifically in pregnant women. Reliable scientific information about medication use in pregnancy is often incomplete or nonexistent. FDA is trying to change that.