title: Is there an easy way to convert text into HTML in JavaScript?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/24816/escaping-html-strings-with-jquery">Escaping HTML strings with jQuery</a><br>
    <a href="https://stackoverflow.com/questions/1219860/javascript-jquery-html-encoding">JavaScript/jQuery HTML Encoding</a>  </p>
  </blockquote>
  
  
  
  <p>For example, if I wanted to show the user the string <code>x &lt; 3</code> in HTML I would need to replace the <code>&lt;</code> character with <code>&amp;lt;</code>.  Is there a prebuilt function to do this in JavaScript or perhaps jQuery that converts any text string into the corresponding HTML?</p>