title: nodejs, jade escape markup
body: <p>I have an Express app using the default Jade view engine. When I try to render HTML as-is in a <code>&lt;pre&gt;</code> element, it gets rendered as actual DOM elements instead of literal characters.</p>
  
  <pre><code>h1 Code Sample
  pre
    code
      &lt;div&gt;some text&lt;/div&gt;
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>&lt;h1&gt;Code Sample&lt;/h1&gt;
  &lt;pre&gt;
    &lt;code&gt;
      &lt;div&gt;some text&lt;/div&gt;
    &lt;/code&gt;
  &lt;/pre&gt;
  </code></pre>
  
  <p>How do I escape the HTML so that it gets rendered as follows?</p>
  
  <pre><code>&lt;h1&gt;Code Sample&lt;/h1&gt;
  &lt;pre&gt;
    &lt;code&gt;
      &amp;lt;div&amp;gt;some text&amp;lt;/div&amp;gt;
    &lt;/code&gt;
  &lt;/pre&gt;
  </code></pre>