Anti-pornography groups have succeeded in their efforts to get Starbucks and McDonald's to block porn on the chains' Wi-Fi networks.

Earlier this year McDonald's (MCD) responded by putting filters in place at most of its U.S. restaurants, a change that was disclosed this week. The company had already had the filtering in place at its U.K. restaurants.

"McDonald's is committed to providing a safe environment for our customers," he said. "We had not heard from our customers that this was an issue, but we saw an opportunity that is consistent with our goal of providing an enjoyable experience for families."

The anti-porn groups Enough is Enough and the National Center on Sexual Exploitation then appealed to Starbucks to follow McDonald's lead. In response to questions from CNNMoney, Starbucks (SBUX) said Friday it's will do so the same thing at its company-owned stores around the globe as well.

"Once we determine that our customers can access our free Wi-Fi in a way that also doesn't involuntarily block unintended content, we will implement this in our stores," said a Starbucks spokesperson. "In the meantime, we reserve the right to stop any behavior that interferes with our customer experience, including what is accessed on our free Wi-Fi."

The moves were praised by the two groups that had sought the change.

"This is a huge victory," said Donna Rice Hughes, president of Enough is Enough. "We're proud of Starbucks and McDonalds for stepping up to the plate. Internet pornography is a public health crisis. Parents need to know which family restaurants are safe from online threats."

While there are no statistics on how often these chains' networks have been used to view pornography, she said there have been news reports about public Wi-Fi hotspots increasingly being used to traffic child pornography and the sexual solicitation of children.

"These criminal felonies are difficult to deter because of the anonymity offered by open Wi-Fi," she said.

Related: Playboy enters non-nude era

The anti-porn groups say that some smaller chains, including Panera Bread (PNRA) and Chick-fil-A already had filters. They say the filters are now sophisticated enough that people can watch mature but non-pornographic content, such as HBO's "Game of Thrones."

The groups say people are turning more and more to mobile devices to watch porn. They also worry children can come across explicit content while at one of the restaurants with Wi-Fi, either by accident or if they are trying to get around filters their parents put on their home networks.