Missouri senators on Monday passed a wide-ranging bill that would ban marijuana-infused candy for medical use, an attempt to ensure children don't accidentally eat the drug.

The measure would ban candy, lollipops, cotton candy and fruit- and animal-shaped edibles that could appeal to children. Marijuana-infused food or its packaging would have to be stamped with the drugs' dosage.

The bill also includes stiff penalties for people caught with the lethal opioids fentanyl and carfentanil and what are commonly known as date-rape drugs.

Under the bill, selling or trying to sell more than 10 milligrams of fentanyl or carfentanil would be punishable by five to 15 years in prison. Those convicted of trying to sell 20 milligrams or more of the drug would face between 10 years and life behind bars.

Possessing or trying to buy more than 10 milligrams of fentanyl would mean up to seven years in prison or five to 15 years behind bars for 20 milligrams or more.

A similar bill already passed the House.

Senators voted 28-1 to send the bill to the state House for consideration.