title: javascript string replace &lt; into <
body: <p>Hey all, I basically output content into a div like this using jquery:</p>
  
  <pre><code>var text = $("#edit").val();
  $("#output").text(text);
  </code></pre>
  
  <p>But I want to turn "&amp;lt;" and "&amp;gt;" into "&lt;" and ">". </p>
  
  <p><code>text.replace(/&amp;lt;/,"&lt;");</code> doesn't seem to be working for me...</p>
  
  <p>Any ideas? Many thanks</p>