According to BBC News, the Scottish Parliament last week passed the Hate Crime and Public Order (Scotland) Bill (full text). Among other things, the new law (§3(2)) outlaws threatening or abusive behavior or communications made with the intent to stir up hatred against a group based on its religion or perceived religious affiliation, or based on the group's sexual orientation or transgender identity. It goes on to provide (§9A), however,:
... [B]ehaviour or material is not to be taken to be threatening or abusive solely on the basis that it involves or includes—
(a) discussion or criticism of matters relating to—(i) age, (ii) disability, (iii) sexual orientation, (iv) transgender identity,(v) variations in sex characteristics,
(b) discussion or criticism relating to, or expressions of antipathy, dislike, ridicule or insult towards— (i) religion, whether religions generally or a particular religion, (ii) religious beliefs or practices, whether religious beliefs or practices generally or a particular religious belief or practice, (iii) the position of not holding religious beliefs, whether religious beliefs generally or a particular religious belief,
(c) proselytising, or
(d) urging of persons to cease practising their religion.
The bill (§16) also abolishes the common law offense of blasphemy.