The news broke last week that Amazon and Barnes & Noble were stocking self-published ebooks about rape, bestiality and incest.

Now most of the big e-publishers are scrambling to get rid of the content, including Kobo and WHSmith, pulling their sites offline and checking through the thousands (at least) of books they’re selling online.

There are two big problems that this whole mess has identified, and these publishers need to fix them fast.

One is that the search engine algorithms are set up in a way that even typing innocuous search terms into the field yields predictive suggestions about incest or rape.

This is like having these books on general display in the fiction section of a bricks-and-mortar store, which when you think about it like that is just crazy.

Publishers need to (and probably are falling over themselves trying to) wall this content off from everything else: it’s the kind of porn you’d normally find in a back-alley shop in Soho. Not harmless, kinky erotica but very harmful material that caters to the predilections of a small minority.

That makes it even more bizarre that it’s easily searchable and available on mainstream retail websites.

The other problem that needs addressing is a bit more difficult. It’s to do with self-publishing, and brings up all the old arguments which characterise the archetypal agitators on either side of the whole self-pub debate.

It is this – we need gatekeepers. Maybe. At least, moderators, which are slightly different, I suppose.

The great beauty of self-publishing is that there are no gatekeepers: no publishers, editors, agents who can turn down your book and say ‘it’s crap’ or ‘it’s not what we’re looking for’ or ‘the public won’t read this’.

Self-publishing breaks all the rules of the book-reading economy by letting writers price their book themselves, market it themselves, send it out there to see what people think, all with little more investment than the time it takes to write the book itself.

Editors and publishers are fantastic and have helped many a writer’s career – just as self-publishing is responsible for many failures as well as a few wild success stories.

But editors aren’t exactly the gatekeepers we need. We need to be able to vouch for quality control on Amazon et al’s self-publishing sites in another way.

We don’t need them to hire people to read the vast swathe of self-published entries that come in each week – it would defeat the point of self-publishing.

But surely we can expect an algorithm – as advanced as search algorithms which people install on their computers as porn filters all the time – which can pick up enough keywords to highlight – not outright ban – a text which seems like it might be abuse-themed.

That’s when humans come in: the sites should then have a group of paid readers who check out the text and either (depending on whether the publisher is happy selling such material) mark the text as fine; it’s a Stieg Larsson-esque book containing abuse but not advocating it, or ban it/give it a restricted rating which would exclude it from the publisher’s main book site.

That is not too much to ask of these companies. Self-publishing is still a young and developing market. This last week marks a big turning point in that development.