I see your problem, however??????????

The linebreak comes directly after the IP-address and BEFORE the "¿" which is set in the same code line as the IP. for this reason I think it is caused by the IP-address. How is it defined?, does this variable hold more then what we expect.
Do a test with several IP's for one (expected) line, do they also show this linebreak behaviour?