As the nationwide war on discussing the role of racism in American institutions — framed by the right as critical race theory (CRT) — wages on, opponents to the bans should look no further than Pennsylvania for an example of how regulating ideas can become law.

A bill introduced in June by Republican State Rep. Russ Diamond took an extremely broad approach to critical race theory, the latest right-wing manufactured outrage, which makes a boogeyman out of an academic movement exploring the relationship between racism and law throughout American history. If passed, the bill would not only revoke funds from public schools and universities that teach, assign a reading, or invite a speaker to speak on CRT, which Diamond defines as a “racist or sexist concept” — it also creates a path for individuals to sue educational institutions that violate the ban.

» READ MORE: Should Pa. schools adopt critical race theory curriculum? | Pro/Con

The Pennsylvania bill, like legislation in other states, has drawn widespread condemnation — including from conservatives. Some critics pointed out that the bill would be “blatantly unconstitutional.” Others note the hypocrisy that Republicans have spent the last year blaming Democrats for ascribing to “cancel culture,” only to attempt to cancel discussion of race in schools.

That is all correct. American students should learn — and debate — the historical pervasiveness of racism in America. Banning such discussion is blatantly antidemocratic.

But there is a deeper hypocrisy at play in Pennsylvania.

In November 2016, Gov. Tom Wolf, a Democrat, signed into law a bill prohibiting the Commonwealth of Pennsylvania from contracting with businesses that boycott Israel. In signing the bill, Wolf said that Pennsylvania “will not encourage economic punishment in place of peaceful solutions to challenging conflicts.” Wolf added that contracting with entities that boycott Israel would be “antithetical to our country’s position on the world’s stage.”

The ban responded to the call by Palestinian advocates to boycott, divest, and sanction (BDS) Israel as part of a pressure campaign to end the Israeli occupation of Palestine. The effort is modeled after the successful boycott of South Africa that played a critical role in ending apartheid, the core principles of which were crafted in Philadelphia. The organization leading the charge, the BDS movement, has been accused of anti-Semitism. Recent years have seen multiple controversies on campuses around the United States about BDS and speakers who support a boycott. In 2017, for example, a Palestinian Quaker professor from Swarthmore College was uninvited from giving a talk at Friends’ Central School in Wynnewood after he was accused of being a leading voice for BDS.

The ban passed both chambers almost unanimously and Pennsylvania joined about 30 other states with similar bans. Ironically, there doesn’t seem to be anything explicit in state law that would prevent a fervent anti-Semite, such as a white nationalist, from contracting with the state.

» READ MORE: America’s founders fought for the right to debate critical race theory | Editorial

To enforce the ban, the bill directs the Department of General Services to require that all new contractors certify that they don’t and won’t engage in such a boycott. A department spokesperson told me in an email that he is unaware of any contract that was refused or terminated because of the BDS clause — showing that, like the CRT bill, the ban is more about posturing than leading to actual behavior change.

Just as the CRT bill raises constitutional questions, so does the BDS ban.

Earlier this year, a federal judge struck down a similar prohibition in Georgia. Georgia State University invited a speaker who supports BDS to a conference on an unrelated matter. The speaker refused to certify otherwise in order to receive an honorarium. A federal judge found that by requiring such certification, Georgia has been “requiring a person to espouse certain political beliefs or to engage in certain political associations” — and that’s unconstitutional.

The ruling in Georgia was specific to the state’s bill. But this isn’t the first time federal courts affirmed the right to boycott. In 1988, in a case about a ban on a Black-led boycott of white merchants in Claiborne County, Miss., the U.S. Supreme Court held that states have no “right to prohibit peaceful political activity such as that found in the boycott in this case.” The court added that a boycott is a peaceful alternative to “riot or revolution” — contradicting Gov. Wolf’s statement in signing Pennsylvania’s boycott bill.

» READ MORE: As my family shelters in Tel Aviv, I’m unsettled that progressive Americans aren’t speaking up for Palestinians | Opinion

As an Israeli Jew who is deeply disturbed by my home country’s treatment of Palestinians, I personally struggle with boycotting Israel. My daughter has grandparents and cousins in Israel. I can’t bring myself to declare that she will never see them — something that is forced on many Palestinian children living outside of the West Bank and Gaza. But like other Israelis, I fully support the right of other people to boycott. In fact, I welcome any nonviolent international assistance to push Israel to end an injustice.

But you don’t need to agree with the boycott at all to see the problem with the BDS ban — or with prohibition on honest discussion of racism in the classroom.

Just as it’s the right of a teacher to explore racism’s role in American society, it’s the right of any business owner to engage in peaceful protest — including if the reason is to advocate for Palestinian rights. Unlike the proposed CRT ban, the BDS ban passed in bipartisan fashion and with little condemnation. Those who are rightly horrified by the current effort to ban ideas should also call for the repeal of the BDS ban.