Actor Katie Leung, who played Cho Chang in the Harry Potter franchise, opened up about experiencing racist attacks from fans online while filming the fantasy series. She said publicists told her to deny what was happening if she were ever asked.

Leung recalled what happened on an episode of the podcast “Chinese Chippy Girl” released on Monday. She says after her casting in 2005’s “Harry Potter and the Goblet of Fire” was announced, she started seeing racist messages from fans online.

“I was Googling myself at one point, and I was on this website, which was kind of dedicated to the Harry Potter fandom. I remember reading all the comments. And, yeah, it was a lot of racist shit,” she says.

Leung, who was born in Scotland and is of Chinese descent, was only 16 when she was cast in the Harry Potter films. She recalled not receiving any media training before doing interviews and said publicists told her to deny that the racist attacks were happening.

“I remember them saying to me, ‘Oh, look Katie, we haven’t seen these, these websites that people are talking about. And you know, if you get asked that, just say it’s not true. Say it’s not happening,’” she said. “And I just nodded my head. I was like, ‘Okay, okay,’ even though I had seen it myself with my own eyes. I was like, ‘Okay, yeah, I’ll just say everything’s great.'”

Warner Bros. Pictures, the studio behind the Harry Potter films, declined to commentIt is unclear if the publicists worked for the studio or for the actress.

“I was really fucking grateful that I was in the position I was in,” Leung said. “I keep saying, ‘Oh I wish I’d maybe said something.’ But you can’t do that.”

After “Goblet of Fire,” Leung was featured in the following four Harry Potter movies — “Order of the Phoenix,” “Half-Blood Prince” and the two “Deathly Hallows: Part 1 and 2.” She’s also appeared in films like “Locked Down” and “The Foreigner” and TV shows such as “The Nest,” “White Dragon” and “Chimerica.”