I have a String variable which contains carriage returns and new lines \\r\\n.
text = \"Text1\\r\\nText2\\r\\nText3\";
This is normal behaviour, in HTML consecutive whitespace such as spaces and linebreaks gets normalized so it displays just as a single space. You would get the same display if you included the text with linebreaks directly in the HTML source. To honor linebreaks in the the output you would have to wrap the text in pre tags or apply a stylesheet class:
For other possible values for the white-space attribute look at this page: http://www.w3schools.com/cssref/pr_text_white-space.asp