Use trim() for removing spaces around commas.