Editor's note: Gabe Rottman is a legislative counsel and policy adviser with the Washington Legislative Office of the American Civil Liberties Union.
(CNN) -- When men and women enlist in the military, they take an oath to support and defend the Constitution, including the First Amendment, against all enemies, foreign and domestic, and affirm that they will "bear true faith and allegiance to the same."
That oath is betrayed by legislation that sneaked through the House of Representatives last week and was signed into law by the president Monday.
Known as the "Sanctity of Eternal Rest for Veterans Act," it passed as a small piece of an otherwise unexceptional omnibus veterans' bill. It would broadly expand existing restrictions on political protest on public land near military funerals. Notably, the ACLU of Eastern Missouri is actively litigating against similar state legislation that is far narrower in some respects.
Protests cannot be held within 300 feet of the cemetery, and the law bans conduct that blocks someone from entering or leaving the cemetery within a 500-foot radius. Protests are prohibited two hours before the funeral through two hours afterward. It similarly expands restrictions on protests at government cemeteries and gives people injured by the protest a right to sue.
Although it covers all protests near military funerals, the law is targeted, at the Westboro Baptist Church, and that's a First Amendment problem in and of itself. Its members believe that the wars in Iraq and Afghanistan, and the attendant casualties, are divine punishment for America's acceptance of lesbian and gay rights. They protest outside military funerals to publicize their beliefs -- holding signs that say "Pray for More Dead Soldiers" and "God Killed Your Sons" -- but do not cause any disruption of the funeral proper.
Now, as repellent as these protests are, they are a permissible exercise of the freedom of speech. If the First Amendment means anything, it's that the government cannot target a group for censorship because it disagrees with the group's message. This legislation does exactly that.
Sen. Olympia Snowe, R-Maine, introduced the bill a month after the Supreme Court ruled in Snyder v. Phelps that, as lawful speech on a public issue, Westboro Baptist Church protests warranted the highest protection of the First Amendment against state tort claims.
But the imprudence of this legislation goes further. Part of the public reaction to Westboro Baptist protests, as happens with much unpopular political speech, are counterprotests. Those would likely be barred as well by the expanded law, under its "tendency to disrupt" language. If the counterprotests are immune from the law's reach because the government agrees with their message, the law will be doubly unconstitutional.
The issues raised by this new law are a lot like those in the dust-up after Chick-fil-A CEO Dan Cathy spoke out against same-sex marriage. I agree that Chick-fil-A shouldn't be celebrated as some sort of free speech hero, and if you choose not to indulge in a Chick-fil-A chicken sandwich in protest of intolerance, more power to you.
But I'm more concerned by the suggestion of a Chicago alderman that he would go so far as to block a local Chick-fil-A franchise's building permit simply because of Cathy's views, rather than any discriminatory policy of the chain. In some ways, a willingness to ignore the law to shut down someone with whom you simply disagree is worse than Cathy spouting off against marriage equality.
Part of living in America means putting up with words with which you not only disagree but that offend deeply. This is especially true when, as in the Westboro Baptist Church case, the words actually carry a political message.
The expansiveness of the new law violates this core principle. It isn't about protecting the solemnity of a soldier's funeral; that's already fully protected under existing trespass, private property and disorderly conduct laws. It's about censoring unpopular speech. That is inconsistent with the law, the Constitution and the military's oath to the Constitution.
Follow @CNNOpinion on Twitter.
Join us at Facebook/CNNOpinion.
The opinions expressed in this commentary are solely those of Gabe Rottman.