It's likely that you'll have to format the output ... in HTML newlines are just treated like a space character (and multiple spaces are condensed to a single space).
In PHP you could use nl2br...
You could also keep a little more control with str_replace...
An example, leaving blank lines for double newlines:
$data = str_replace("\r","",$data); // collapse \r\n\r\n or \n\r\n\r
$data = str_replace("\n\n","<br /><br />",$data);