I have some text in a variable \[code\]sometext\[/code\] which I want to assign to \[code\]div\[/code\] using \[code\]$('div').text(sometext);\[/code\]. The problem is that all \[code\]<br/>\[/code\]s in \[code\]sometext\[/code\] turn into \[code\]< br/ >\[/code\]. I cannot use \[code\]$('div').html()\[/code\] because there's a lot of internal structure that I want to retain within the \[code\]div\[/code\], so I can only use the \[code\].text()\[/code\] function. So once I've passed the text over the to the \[code\]div\[/code\], is there any way to change the encoded \[code\]<br/>\[/code\] tag into a real line break in HTML? I mean something like this:\[code\]$('div').convertMyBRsToHTML();\[/code\]