Adding html and plain text inside div with jQuery
<p>I'm recieving a string (it may be either plain text or HTML text) from server, and I need to insert it into a div after that. </p>

<p>I can use <code>$div.text(textFromServer)</code> if I know that <code>textFromServer</code> is plain text. </p>

<p>If I know that <code>textFromServer</code> is html I can do something like <code>$(textFromServer).appendTo($div)</code>. </p>

<p>The problem is that I don't know for sure whether <code>textFromServer</code> is plain or HTML. </p>

<p>So here's the question: is there a elegant and simple solution for my problem? Or do I have to analyse <code>textFromServer</code>?</p>
