title: Best way to handle mixed HTML and in user input?
body: <p>In a PHP application I am writing, I would like to have users enter in text a mix of HTML and text with pointed-brackets, but when I display this text, I want to let the HTML tags be rendered by the non-HTML tags be shown literary, e.g. a user should be able to enter:</p>
  
  <pre><code>&lt;b&gt; 5 &gt; 3 = true&lt;/b&gt;
  </code></pre>
  
  <p>when displayed, the user should see:</p>
  
  <p><strong>5 > 3 = true</strong></p>
  
  <p>What is the best way to parse this, i.e. find all the non-HTML brackets, convert them to &amp;gt; and &amp;lt;?</p>