There is no theatre censorship in Britain before a play is performed. There used to be: the Lord Chamberlain's office had an Examiner of Plays whose job it was to censor any play before it could be performed to the public (although private theatre clubs did not come under his jurisdiction). Although outright bans were not common, he would frequently insist on changes being made to the script before giving approval for performance. However that post and that kind of censorship was abolished in the 1960s.
That does not mean that anything can be performed. Now plays are in the same category as books: in other words, a company or theatre can be prosecuted is a play is judged to be obscene, libellous (in printed form) or slanderous (when performed), blasphemous (although this is rarely used nowadays as society is increasingly secular), liable to incite racial hatred, liable to cause public disorder, or any other of a number of other "liable to..." offences - but it has to be performed (or published in the case of libel) before any action can be taken. I suspect that treason is also a possible offence, although I have never heard of it being invoked except in wartime.