Ukip leader Nigel Farage speaks at the Sage building in Gateshead Ian Forsyth/Getty Images

Over a quarter of Britons believe Ukip is racist, and over half the country believes Nigel Farage's party is a magnet for people with "extreme or odd views."

That is according to a YouGov poll, which also suggests that many voters will switch to other parties at the general election in 2015.

Yet the findings also indicate that Ukip will perform strongly in the upcoming European elections, despite the spate of scandals which have engulfed the party over recent weeks.

The YouGov poll, commissioned by the Sun on Sunday, found that 27% of people believe Ukip has "racist views" and another 35% say that although the party itself might not be racist, it does "seem to attract some candidates or supporters with racist, extreme or odd views".

In recent weeks Nigel Farage has faced a barrage of criticism for a poster campaign seen by many as racist, and admitted there were "some idiots" within the party.

This weekend Ukip candidate Harry Perry, due to stand in the European elections in Offerton, Stockport, was reported to have posted a series of offensive tweets about Islam, multiculturalism and homosexuality. He is now being investigated by the party.

Recently several other Ukip candidates were criticised for posting offensive remarks. William Henwood said Lenny Henry should emigrate to a "black country", while Andre Lampitt criticised Islam and Nigerians and James Elgar said women belong in the kitchen.

In one campaign poster, Ukip depicts the white cliffs of Dover with an escalator ascending it along with the words, "No border. No control. The EU has opened our borders to 4,000 people every week."

Ukip's election posters have been criticised by many Ukip

Nigel Farage also stepped into the Jeremy Clarkson debate, saying the Top Gear presenter and writer's alleged use of a racist term was "very, very close to the line of being offensive but perhaps not quite over it."

Despite – or, perhaps, because of – these controversies, 29% of those polled said they would vote for Ukip at the European election. Twenty six percent said they would vote Labour, 23% Conservative and 10% Liberal Democrat.

However when asked how they would vote in the 2015 general election, Ukip fared less well. Thirty six percent of those polled would vote Labour, 33% Conservative, and just 15% Ukip.

According to a separate YouGov poll for the Sunday Times, the Lib Dems will be relegated to fifth place in the European elections, behind the Green Party.