The Espionage Act of 1917 was amended by Congress the following year to not only target those who interfered with the draft, but also those individuals guilty of sedition, in other words, those who publicly criticized the government Â including negative comments about the flag, military or Constitution (text).
The revised law provided in part:
SECTION 3. Whoever, when the United States is at war, shall willfully make or convey false reports or false statements with intent to interfere with the operation or success of the military or naval forces of the United States, or to promote the success of its enemies, or shall willfully make or convey false reports, or false statements, ...or incite insubordination, disloyalty, mutiny, or refusal of duty, in the military or naval forces of the United States, or shall willfully obstruct ...the recruiting or enlistment service of the United States, or ...shall willfully utter, print, write, or publish any disloyal, profane, scurrilous, or abusive language about the form of government of the United States, or the Constitution (narrative) of the United States, or the military or naval forces of the United States ...or shall willfully display the flag of any foreign enemy, or shall willfully ...urge, incite, or advocate any curtailment of production ...or advocate, teach, defend, or suggest the doing of any of the acts or things in this section enumerated and whoever shall by word or act support or favor the cause of any country with which the United States is at war or by word or act oppose the cause of the United States therein, shall be punished by a fine of not more than $10,000 or imprisonment for not more than 20 years, or both....
United States, Statutes at Large, Washington, D.C., 1918, Vol. XL, p. 553 and following.
More than 2,000 prosecutions occurred under the original and amended Espionage Act, the most famous of which was that of Socialist spokesman and draft opponent, Eugene V. Debs, who was sentenced to 10 years in prison.
Both the Espionage Act and the Sedition Act were repealed in 1921.
See the Red Scare of 1919-20.