fixed the truncatechars-filter and added tests for it.