Strip newlines from input