Was wondering why the text area content with line breaks was not getting displayed properly as html on the first attempt. Then found that the \n were auto stripped by html while displaying the text field contents with line breaks as html.
So, here is the fix that I incorporated in the html page that was displaying the text area content with line breaks. The best way via which I was able to fix this up was as below:
Let us say content is the field that has the text area content stored in it from the database.
While displaying that in the html page, I used
content.replaceAll(’\n’,’<<br />>’)And this worked!