Trim spaces from user input.