A controversial copyright law that opponents claim will undermine the way the internet works has been approved by the European Parliament.

After rejecting an earlier version in July, MEPs voted by 438 to 226 (with 39 abstentions) in favour of a directive which its proponents say brings in necessary reforms to ensure artists are fairly compensated, but which opponents maintain risks placing an excessive restriction on free speech by requiring all internet platforms to filter content put online by users.

They target in particular article 13, which aims to impose an obligation on websites that allow users to upload files – such as Google, YouTube and Facebook – to filter everything for potential copyright infringements before making it available online. It is said this could spell the end of linking to other content, live streaming, parodies and memes, as well as drive the filtering of content before it is posted live, rather than subjecting it to take-down procedures as at present, thus imposing a form of censorship.

Article 11, which enables media organisations to charge for links to their content, has also caused division as likely to inhibit the spread of news, and to harm smaller concerns rather than the giants such as Google and Facebook against whom it is aimed, but under the amended version approved yesterday this will not include the sharing of hyperlinks to content such as news stories.

The EU Council has still to agree a final form of the directive before it becomes law, which could potentially take place before Brexit, and campaigners against the provisions have vowed to keep up the fight.

EU commissioners Andrus Ansip and Mariya Gabriel, who proposed the reform, said it was "an essential step to achieving our common objective of modernising the copyright rules in the European Union".

Many musicians, including Sir Paul McCartney, have supported the reforms though a minority are opposed.