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
As we go into the Bank Holiday weekend, the changeable weather pattern looks set to continue.
A Chelsea pensioner has been imprisoned for 12 months for sexually assaulting a young woman in his room.
Once a year W11 comes alive with the colour of carnival. Everything you need to know about getting around and what to see in Notting Hill.