Your stylist botched your haircut; your mechanic missed a leak in your radiator; your hotel room was freezing; your boss piles on the work.

You vent your grievances online in a forum like Yelp, TripAdvisor or Glassdoor. Then comes a knock on the door. You’re being sued by the business you slammed.

That’s what happened to Linda and Isaac Su of Castro Valley after they complained on Yelp about their dentist’s billing practices, and to Deidra Carson of Kentfield when she wrote a scathing Yelp review of a cosmetic surgeon who left her with lasting facial scars after a laser peel.

“The dentist sued us in small claims court, claiming we cost his business $8,000,” said Linda Su. “I was shocked. It was very stressful as I was nine months pregnant.”

Now two pending federal laws are designed to protect consumers from legal retaliation when they express opinions online. Yelp is also now acting to red-flag the review sites of merchants who have sued customers for negative reviews.

“There are bullies out there who seek to silence individuals for speaking out on matters of public interest,” said Evan Mascagni, policy director at the Public Participation Project, a free-speech nonprofit. “These laws aim to combat that and get these lawsuits dismissed relatively quickly and painlessly.”

The two pending laws intend to protect free speech both before and after it occurs. They are:

•Consumer Review Fairness Act, HR5111. Nicknamed the “Right to Yelp Act,” this would bar companies from including non-disparagement provisions — gag clauses — in agreements they ask consumers to sign. In essence, it would stop companies from trying to nip complaints in the bud by getting consumers to waive their rights to gripe. The Senate version, SB2044, is called the Consumer Review Freedom Act.

•Speak Free Act, HR2304. This would create a legal weapon for defendants in lawsuits over their publicly expressed thoughts. Such cases are called SLAPP (strategic lawsuits against public participation). Someone who is hauled into court over their words can invoke the bill’s anti-SLAPP motion to get the case dismissed quickly — and to force the plaintiff to pay attorney’s fees.

California has robust versions of both laws, which means that people sued here for expressing their opinions usually prevail in court. But since there’s no similar federal shield, merchants in California who get their noses out of joint can sue customers in federal court — or in one of the 22 states that lack anti-SLAPP laws — where consumers have fewer protections.

While the growth in online forums helped the bills gain momentum, their reach extends beyond online speech. “We heard cases of people in very poor communities in the rural South speaking out against issues like coal ash dumping in their communities and getting threatened with lawsuits for millions of dollars,” Mascagni said.

Yelp is among some 40 companies and nonprofits backing the bills, which also have bipartisan support in Congress, where they are expected to move forward this fall.

Not everyone agrees that the bills are the best mechanism. Alexander Reinert, a professor at Benjamin N. Cardozo School of Law, testified in the House that the Speak Free Act is unconstitutional, could “impose significant barriers to important civil rights and public interest litigation,” and intrudes into states’ rights. “There is no evidence that the problem HR2304 is trying to solve actually exists on a scale sufficient to justify any legislation,” he said.

The act would short-circuit the constitutional right to a jury trial, he said in an interview, by allowing judges to dismiss cases without hearing any evidence. “There’s every reason to think that when you give defendants tools to use to get rid of cases, they will use them in as many ways as possible,” he said. “Almost always that power will bend in favor to people who have access to more resources.”

Mitchell Langberg, a Los Angeles attorney who specializes in helping people who have been defamed, said both acts would make it easier for “disgruntled customers, former employees and competitors to use forums like Yelp in a very terroristic way to attack and destroy, sometimes with dishonest information.” At the same time, they’d make it much harder for victims of false reviews to get justice in court, he said.

But Yelp and other supporters say the bills serve an important purpose. “If they become law, they will give clarity to Yelp reviewers nationwide that they have protections for their fact-based, honest opinions online,” said Laurent Crenshaw, director of public policy at Yelp in San Francisco.

However, a case that the California Supreme Court just agreed to hear has the potential to create an end-run around laws to protect online free speech, some legal experts said. The case, Hassell vs. Bird, centers around a San Francisco lawyer, Dawn Hassell, who sued a former client, Ava Bird, over one-star Yelp reviews. A San Francisco judge ruled that the reviews were defamatory and ordered Yelp to remove them, in a decision that was upheld by a California appeals court.

The case would create a precedent allowing people “to remove information they don't like from the Internet by obtaining a default judgment, however questionable, against the poster, and then getting a court order forcing the website itself to remove the statements — all without suing the website or giving it a day in court,” said Aaron Schur, Yelp senior director of litigation. “This restricts a website's ability to provide a balanced spectrum of views online and decreases the ability for people to get vital information online to inform their decisions.” Hassell’s attorney, Monique Olivier, disagreed, saying that the case only narrowly applied to content ruled to be defamatory.

It will probably take at least a year for the California Supreme Court to rule in that case.

Meanwhile, Yelp is taking new steps to fight back against companies that sue its users, flagging their review sites with a red box headlined “Consumer Alert: Questionable Legal Threats,” with text explaining, “This business may be trying to abuse the legal system in an effort to stifle free speech.”

So far it has a tagged a handful of businesses, none of them in California.

“We’re trying to alert consumers to the fact that these businesses have taken extraordinary legal steps against consumers who have written critical reviews against them on Yelp,” Schur said. “We want businesses to know it’s not risk-free for them to file a case; they will have to contend with consumers knowing that they are suing.”

However, Yelp doesn’t take actions on behalf of reviewers who get sued but instead directs them to a list of resources. “We’re not trying to take sides beween a review and a business,” Schur said. “We’re happy to point consumers toward resources for legal assistance.”

Linda Su said she was disappointed that Yelp didn’t offer more help. She and her husband took time off to appear in small claims court in August, where a judge dismissed the dentist’s case because of a mistake in his paperwork.

San Francisco’s Electronic Frontier Foundation, which promotes online free speech, said it receives queries at least weekly from consumers being sued over online reviews, usually on Yelp and sometimes on Glassdoor, a site where employees rate their workplaces, said staff attorney Sophia Cope. The EFF does not take individual cases, however.

“We need a federal law that applies in all states,” Cope said.

For Kentfield’s Carson, California’s anti-SLAPP law proved a potent defense.

After a laser peel left her with an infection and permanent facial scars, Carson took to Yelp to recount her experience. Her plastic surgeon sued her for $2 million.

“I just posted what happens, this was my experience, what occurred, my treatment,” Carson said. “I wanted people to know what had happened.”

She was among a dozen Yelp reviewers sued by the plastic surgeon, but the others had posted anonymously. Carson was the only one who got taken to court, where she prevailed, thanks to California’s anti-SLAPP laws. The doctor had to pay Carson’s legal fees and pony up an extra $2,000 to her lawyer for the “public interest benefit” of the case.

As a business owner herself, Carson has been on both sides of Yelp reviews, occasionally receiving negative ones for her San Anselmo clothing boutique. “I usually just ignore them; my feelings don’t get hurt over stuff like that,” she said. “People read all the reviews so they can get a well-rounded view of things.”

As for her plastic-surgeon experience, “Nothing I wrote was factually inaccurate,” Carson said. “I don’t regret it.”

However, she’s stopped leaving reviews on Yelp.

Carolyn Said is a San Francisco Chronicle staff writer. Email: csaid@sfchronicle.com Twitter: @csaid