Strip newlines from the input