Added formatLineBreaks helper function - replaces carriage returns by HTML line breaks