A joke in the play 'Nell Gwynn' was changed to avoid offending Prince Charles.

Prince Charles

Prince Charles

The play - which stars Gemma Arterton and is based on the mistress of Charles II - references a "boring" Duke of Cambridge but the quip was amended during a performance attended by Prince Charles as his son Prince William is also known as the Duke of Cambridge.

Producer Nica Burns told the Daily Telegraph: "It wasn't a political act, it was politeness. There was a joke about a Duke - it didn't matter which Duke it was - where the King kind of rolled his eyes that a Duke was very boring.

"The name happened to be the Duke of Cambridge.

"Because we had the father of the Duke of Cambridge in the audience, we didn't want to make it sound to the audience like it was deliberate, because it wasn't.

"We thought it was best to change it so people didn't read it the wrong way."

The name was changed to the Duke of Bedford for the performance even though Prince William was not the Duke of Cambridge in question.

The play most likely refers to the Second Duke of Cambridge, Edgar, who lived during the time of Charles II.