A Transport for London spokesman said: "The High Court has found that we were right not to run the Core Issues Trust's advertisement as it would have breached Section 149 of the Equality Act 2010.
"The advertisement clearly breached our advertising policy as it contained a controversial message and was likely to cause widespread offence to the public.
"This was borne out by the hugely negative public reaction the advertisement generated, including on social media and newspaper websites.
"We are taking steps to address the judge's comments regarding our internal processes."
More top news
The passenger rushing to catch a train at Ealing Broadway was headbutted after asking a man who was blocking his way to 'hurry up'.
The FBI is believed to have fitted a tiny microphone into a hotel key fob to spy on officials.
A modified version of the herpes virus has proved a major success in phase III clinical trials.