Isn't this already shown by the new InputFilterUpdate()?  this is what I do in this example: completely replace an input filter.