(Getty Images)

Google and Facebook have come under fire for allowing advertisers to direct ads to users who searched for or expressed an interest in racist sentiments and hate speech.

After two separate news stories exposing these practices, both companies have vowed to change their systems.

It all started on Thursday when ProPublica, which is a non-profit news website, revealed that Facebook enabled advertisers to search for “Jew haters” and other anti-Semitic topics. They now say they will restrict how advertisers are able to target users on their network.

On Friday, an article was published by BuzzFeed that reported Google allowed sales of ads tied to racist and bigoted keywords and even went so far as to suggest more offensive terms that advertisers might be interested in. By noon that same day, they had said they would work harder at halting offensive ads.

— Guest says she was raped by Fox News host Charles Payne — 

These articles have drawn attention to a growing problem. Automated advertising systems turned Google and Facebook into two of the most valuable companies in the world, but the possibility for harm is there as we can see by growing online extremism.

Extremism isn’t the only concern, however. Just last week Facebook disclosed that they had sold ads to fake accounts based in Russia worth more than $100,000 during the 2016 presidential campaign. These were for divisive issues.

“It’s shocking because it’s illustrating the degree of targeting that’s possible,” said Eli Pariser, the author of The Filter Bubble: How the New Personalized Web Is Changing What We Read and How We Think. “But I think the critical piece of context is this is happening when we know that a foreign country used targeted Facebook ads to influence opinion around an election.”

He went on to say, “Before all of this, you could see the rise of targeted advertising, you could see the rise of social politics, but the conjunction of the two in this way feels new.”