Add possibility to specify custom filter function for text filter.