I think we should not overlook that the original cause of these events in Denmark was the publishing of cartoons of Mohammed in the Jyllands Posten, one of which portrayed him as a terrorist complete with a bomb as a hat, and another as a dog. These were not an innocent venture; they were intentionally published in order to provoke an angry reaction from Muslims, and after a while some obscurantist clerics in the Middle East duly took the bait, and all hell let loose, thus 'proving' what the paper wished to prove, that Muslims were a humourless, easily-offended lot lacking the requisite sophisticated qualities of civilised society. The Jyllands Posten is a right-wing paper, it supported the Nazis in the 1930s, and the cartoon episode was within its right-wing agenda, a deliberate attempt to whip up anti-Muslim sentiments.
Whilst it is essential to defend the right to free speech and publication and to criticise and if needs be mock religious dogma and obscurantist clerics, this does not mean that we should view the question outwith the social and political context in which it has been raised. In the case of the Jyllands Posten, we should say that whilst it had the right to publish material which people find offensive, we would not endorse the sentiments behind its doing so; indeed, we would be very critical of them, as socialists do not support the idea of whipping up religious hatred or dividing people along religious lines.
In defending the right to free speech and publication, we must be very careful that we do not allow any campaign for it to become hijacked by people with a reactionary agenda, or allow such people to hide their reactionary agenda behind a call for free speech and publication. The Jyllands Posten is no more a friend of genuine freedom than the Islamists it goaded into an angry response, and ironically enough they share the same agenda: both wish to divide Muslims from the rest of humanity.