escape new lines and extra spaces from all input.