Reputation: 1533
I have a textarea where i get it's content and send it to database via ajax. When i get such content and insert it in a DIV, new lines are not considered, so the content is pasted as a whole without LF.
I used jQuery templates for printing the result of my query and within the template the mentioned div is:
<div class="message">${msg}</div>
where ${msg} is the message gathered from the database with CR.
Is there anything I could do for avoiding that?
Upvotes: 0
Views: 272