Expurgation
Expurgation is a form of censorship which involves purging anything deemed noxious or offensive, usually from an artistic work.
Bowdlerization is a pejorative term for the practice, particularly the expurgation of lewd material from books. The term derives from Thomas Bowdler's 1818 edition of William Shakespeare's plays, which he reworked in order to make them more suitable, in his opinion, for women and children. He similarly edited Edward Gibbon's Decline and Fall of the Roman Empire.
A fig-leaf edition is such a bowdlerized text, deriving from the practice of covering the genitals of nudes in classical and Renaissance statues and paintings with fig leaves.
Examples
Religious
In 1264, Clement IV ordered the Jews of Aragon to submit their books to Dominican censors for expurgation.
Sexual
"The Crabfish", (known also as "The Sea Crabb") an English folk song dating back to the mid-1800s about a man who places a crab into a chamber pot, unbeknownst to his wife, who later uses the pot without looking, and is attacked by the crab. Over the years, sanitized versions of the song were released in which the lobster grabs the wife by the nose instead of by the genitals or that imply the location of the wounds by censoring the rhyming word in the second couplet. For instance, "Children, children, bring the looking glass / Come and see the crayfish that bit your mother's a-face" (ass).