Victorians expurgated Malory of sex and violence. Think they were also responsible for Chaucer not being Chaucer, too. Authors themselves have edited their texts during their own lifetimes - Dahl himself removed some overly racist content, the Oompa Loompas were originally African pygmies, rescued to this country for their own good and made to work at Wonka's factory.
Here's some of the context to that... which was done in the 1970s.
I find it slightly odd I get the mocking laugh emoji for stating a fact, that editing of texts has always happened for contemporary sensibilities - it has. I make no judgement about whether it should or not in that statement. FWIW my own view is that many of the edits are so inconsequential as to not be worth discussing. Some do change the meaning and are maybe heavy handed - and of course the point of Dahl has always been that he would challenge, write childrens books but not for children, allow the introduction of critical thinking rather than a safe, saccharine version of life... and that's why he was popular, so to remove that takes away some of that very essence - it ties into a debate about childrens' literature that's been going on not just for years, but centuries - what's appropriate for children to read.
But, it has always happened! Grimm fairy tales over the years have waxed and waned in their depiction of violence and misogyny after all!