trimming whitespace from the end of filter terms

Could be a problem if for some reason someone has a filter that looks
specifically for "foo " and not "foo" ??  Is that dumb?
Removing comma from docs