title: Escape HTML tag in <textarea>
body: <p>I have one <code>&lt;textarea&gt; tag</code> in my website where the user can put there HTML code and see its preview. My problem is when the user enter code below mention in my <code>&lt;textarea&gt;</code> my preview functionality getting fail :</p>
  
  <pre><code>&lt;html&gt;
  &lt;textarea&gt;Some code to show&lt;/textarea&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>So question is how can I escape this html code in my <code>&lt;textarea&gt; tag</code> as I know the problem is coming because <code>&lt;/textarea&gt; tag</code>.</p>
  
  <p>Any solution on this please.</p>
  
  <h2>Edit</h2>
  
  <p>Question is about using <code>&lt;/textarea&gt;</code> within a textarea.</p>
  
  <p>Problem visible here: <a href="http://jsfiddle.net/hrP6F/" rel="nofollow">http://jsfiddle.net/hrP6F/</a></p>