title: How to escape imported partial in Nunjucks
body: <p>I would like to escape the HTML code from an imported file in Nunjucks.</p>
  
  <pre><code>{% include "item.html" %}
  </code></pre>
  
  <p>The file "item.html" contains following code:</p>
  
  <pre><code>&lt;strong&gt;bold text&lt;/strong&gt;
  </code></pre>
  
  <p>I would like the parent file (which includes item.html) to have the following output:</p>
  
  <pre><code>&amp;lt;strong&amp;gt;bold text&amp;lt;/strong&amp;gt;
  </code></pre>
  
  <p>I tried surrounding the include with an escape filter:</p>
  
  <pre><code>{% filter escape %}
    {% include "item.html" %}
  {% endfilter %}
  </code></pre>
  
  <p>However in that case the file doesn't get included correctly. Any ideas?</p>