Image copyright jennyleong.org

Trolling regularly hits the Trending headlines, but it's not often that police officers are the ones accused of sending offensive online messages.

That's what happened in Australia this week when a story broke accusing members of the New South Wales police force of making racist and sexist comments on Facebook. The posts targeted Jenny Leong, a Green Party politician in Sydney, after she spoke out against the use of drug sniffer dogs on Facebook.

Police in Sydney have the power to patrol certain public spaces - like train stations or festivals - with sniffer dogs. If the dogs behave as though someone is carrying drugs, the police can search them without a warrant.

It's a controversial issue. Many argue it helps keep drugs off the streets, but the Green Party believes the project is not only ineffective, but also an infringement on people's rights.

Last week Ms Leong entered a bill into the New South Wales parliament to try and halt drug dog patrols, and soon afterwards she posted a photo of two police officers and their dog on a train which read: "This kind of harassment and intimidation is exactly what the Greens' bill is aiming to stop." She was certainly expecting a discussion under the post, but what started out as a debate soon descended into a torrent of abuse. As she explains to BBC Trending, "it ranged from... 'You're an idiot' ...to vile attacks, wishing my future children die of drugs."

Image copyright Facebook Image caption One of the abusive memes posted on Jenny Leong's Facebook page

Many of those comments were from members of the public, but the Sydney Morning Herald ran a story linking several posts back to police officers. One comment, "her Daddy was a swamp monkey", and another, "one condom could have prevented this from happening" beneath a picture of Ms Leong, were both allegedly linked back to members of the police force. More are accused of liking the offensive posts.

Online opinion is split in reaction to the news. Of course some were sympathetic with Ms Leong, but others actually spoke out in defence of the police. "Everyone has a right to an opinion, including people that happen to be a cop," wrote one.

The New South Wales Police Integrities Commission, an independent body that investigates police misconduct, has opened an investigation into the matter. And the police force has said the posts could contravene its strict social media policy. Nothing has been heard from the police officers in question.

Follow BBC Trending on Facebook

Join the conversation on this and other stories here.

This isn't the first time police officers have been accused of "commenting" on the Green Party's anti-sniffer dog stance. In March three officers were accused of posting deliberately misleading information on the group's Sniff Off Facebook page, where followers can post information on where drug dogs are patrolling to alert other users.

The officers used personal Facebook accounts to deny dogs were at certain stations across Sydney - apparently to catch people out - despite users posting photos of police units at those locations.

A police spokesman said the officers involved in that incident would be spoken with, and counselled. It isn't yet clear whether more serious action will be taken against any officers found responsible this time around.

Update 18 April 2016 On Sunday The New South Wales police announced they had suspended an officer in relation to the incident.

Blog by Kate Lamble

Next story The mystery veteran who won the internet's heart

Image copyright Aleksandr Petrosyan

The unknown war veteran who has come to symbolise the best of British, American, Australian or Russian spirit. READ MORE

You can follow BBC Trending on Twitter @BBCtrending, and find us on Facebook. All our stories are at bbc.com/trending.