filter newlines from lines send to server