A Doncaster man who published the name of the victim of a sexual offence on the Facebook page of South Yorkshire police has been charged.

Shane Ward, 31, of Edlington, commented on the police’s Facebook page post about the sexual offence court case and identified the victim. He was charged under Section 5 of the Sexual Offences Amendment Act 1992 for breaching the victim’s right to anonymity.

Victims of sexual offences have the right to anonymity for life. Ward is due to appear at Doncaster magistrates’ court on 21 July.

South Yorkshire police the force said it welcomed comments on its Facebook page but would “not tolerate anyone breaking the law or making threatening or abusive posts which are intended to intimidate”.

“We understand that people have differing views on many issues, however we will not condone these types of post and they will be removed and where appropriate, investigated by police.”

In 2012, 10 people were charged and convicted for naming online the victim of a rape involving former Sheffield United footballer Ched Evans. He was convicted in April that year and sentenced to five years in prison.