sebbacon/alaveteli — Issue #358: Censor rules should run in order of decreasing length
Author: bjh21
Created: 2012-01-20 12:59:12+00:00
State: open

At the moment, if I'm trying to remove a user's name from their requests, I might start by creating a censor rule for "Joe Bloggs", and then one for "Mr Bloggs" and then one for "Bloggs", as I find different ways the name might be written. This turns out not to work, though, because the "Bloggs" rule bites first, leaving "Joe [name removed]", which the first rule then ignores. This can be worked around by careful ordering of rules, but I think it would be better if rules were applied in order of decreasing length, so that "Joe Bloggs" and "Mr Bloggs" would be replaced before "Bloggs". This would generally have the right behaviour, and would mean that the order of creation of censor rules wouldn't matter.