Trim special characters in filter