A Hong Kong court has banned people from publishing a wide range of personal details about police officers and their families, including photos, in a bid to halt “doxxing” by pro-democracy protesters.

The temporary injunction, uploaded on government websites overnight, was criticized by some on Saturday for its broad wording and for further shielding the identity of officers as they clash with protesters.

The semi-autonomous Chinese city has been battered by nearly five months of seething pro-democracy rallies in which police and protesters have fought increasingly violent battles.

The police force says many of its officers have had personal details leaked online — known as “doxxing” — and family members harassed as a result.

Lawyers for the force went to Hong Kong’s High Court on Friday asking for an injunction forbidding people from publishing a slew of personal information including key details such as names, addresses, dates of birth and identity card numbers.

But they also sought a ban on publishing details about a police officer’s Facebook and Instagram IDs, their car number plates and any photograph of an officer or their family without consent.

The court granted the injunction for 14 days pending a longer legal hearing.

The injunction also bans “intimidating, molesting, harassing, threatening, pestering or interfering” with any police officer or family member.

The current wording leaves no exceptions, including for media, making it unclear how it will be applied and whether it will restrict work by reporters.

The police did not respond to requests for clarification.