I\'m doing:
alert($(\"#div\").text());
on something like this:
<div> Some text <
Not sure if this would help, but maybe you could try this:
#div { white-space: pre; }