House Republicans approved legislation Tuesday that would allow internet service providers such as Comcast and Verizon to sell browsing information without users' consent.

If signed by President Donald Trump as expected, the legislation will undo a Federal Communications Commission rule approved in October that requires consumers to opt-in before ISPs can sell their internet activity records.

Democrats presented the legislation as an alarming attack on personal privacy, with two members invoking the apparently common experience of being shown embarrassing ads after making online underwear purchases.

“Please leave Capitol Hill for 5 minutes, and find three people on the street who thinks it’s OK,” argued Rep. Michael Capuano, D-Mass., said about ISPs selling users' internet records without consent.

“What are they going to do with it?” Capuano asked. “Look at it and say, ‘Okay Mike takes a size 38 underwear, that’s great!’ They’re going to sell it to the underwear companies. 'Hey, he bought this kind of underwear, he likes this color -- let’s give him ads.'”

Rep. Keith Ellison, D-Minn., pleaded unsuccessfully for Republican opposition, saying, “There’s gotta be someone in that body [of GOP lawmakers] who believes Comcast, Sprint and all the rest should not have anybody’s underwear size in this body. It is an outrage.”

Ellison's plea for libertarian and conservative support fell largely on deaf ears, and it passed 215 to 205 in a mostly party-line vote. The resolution last week passed the Senate in a party-line 50-48 vote, with two Republicans not voting.

Republican argued the Federal Trade Commission is the proper authority to regulate what ISPs can do, and that the FCC rule creates confusion by applying the privacy safeguard to internet providers but not other internet companies that fall under FTC authority.

“Having two privacy cops on the beat will create confusion," said Rep. Marsha Blackburn, R-Tenn., who said the regulation was “another example of big government overreach” that is “suffocating hard-working taxpayers.”

Democrats, however, said the FTC does not currently have authority to establish privacy rules governing ISP use of customer data, pointing to a 2016 ruling from the U.S. Court of Appeals for the 9th Circuit.

Rep. Mike Doyle, D-Pa., said the bill was the work of lobbyists who had presented “bogus” claims about consumer confusion. “This resolution is by the swamp and for the swamp, and no one else," he said.

Doyle warned ISPs can learn “more than you know about yourself” by reviewing internet records. Capuano expressed concern about how internet-connected devices might relay conversations or report to companies the position of a couple's bodies.

Rep. Frank Pallone, D-N.J., alleged that the bill was "a gift to the Russians" and other foreign countries who might be interested in Americans' online activity.

Republicans, however, offered a series of defenses.

Rep. Mike Burgess, R-Texas, said consumers might experience "notification fatigue" from seeing browsing data options.

Blackburn suggested consumers could sue ISPs if they violate the terms of use, and that the free market would punish mishandling of consumer data.

Rep. Bill Flores, R-Texas, meanwhile, said the rule “may jeopardize [consumers'] confidence in the internet" by creating confusion, and Rep. Leonard Lance, R-N.J., said the regulation created a "false sense of privacy" because it only applies to ISPs.

Rep. Anna Eshoo, D-Calif., countered that it makes sense for ISPs to be treated differently from other companies, as “you don’t have to go to Google, you don’t have to go to Facebook."

And Rep. Ro Khanna, D-Calif., argued there isn't much of a free market for ISPs, with local monopolies leaving customers few options.

“Eighty percent of Americans don’t have a choice about which internet service provider they can use and they pay six to seven times more than what people pay in France and what people pay in Britain,” Khanna said. (The actual number of ISPs available in a certain area varies by speed, and precise international comparisons also vary.)

The White House said in a statement Tuesday it supports the bill.

If Trump does sign the bill, internet users still can keep ISPs from monitoring their activity.

Websites that use HTTPS only allow ISPs to see websites visited, but not specific pages. Users of the Tor anonymizing browser or a virtual private network (VPN) can also keep internet providers in the dark, though as Ars Technica notes, each option has drawbacks.

Among the opponents of the legislation are groups such as the Electronic Frontier Foundation, the American Civil Liberties Union and Fight for the Future, which argues more business records may be created, allowing for warrantless government surveillance.