No. He pleaded guilty to "sending a communication of an indecent or offensive nature" and was fined accordingly.
At the end of the day what he said was indecent and therefore is illegal in the UK. Perhaps he could have fought it, but I believe he would have needed to argue that a reasonable person wouldn't find his comments indecent, and that would probably be difficult.
The larger point here is that anyone who gives an opinion online here in the UK is at risk of something similar happening. It depends less on the opinion and far more on the subjective nature of what is and isn't offensive. For example I could say some highly offensive things, but so long as I say them about Nigel Farage or Piers Morgan I'd be unlikely to be charged. I'd argue these laws are very subjectively policed and typically used to against people with political opinions that are not considered "acceptable". For example, it's often used against feminists who argue in favour of women-only spaces since this is considered transphobic and hateful by some.