Remove trailing spaces from search form