title: What is auto escape used for in Swig templating for Node.js?
body: <p>I'm trying to write an itinerary app built on Express. Swig is the template engine. I'm confused by Swig's autoescape feature. What exactly does it do?</p>
  
  <p>Swig <a href="http://paularmstrong.github.io/swig/docs/tags/#autoescape" rel="nofollow">documentation</a> example:</p>
  
  <pre><code>"Control auto-escaping of variable output from within your templates."
  
  // myvar = '&lt;foo&gt;';
  {% autoescape true %}{{ myvar }}{% endautoescape %}
  // =&gt; &lt;foo&gt;
  {% autoescape false %}{{ myvar }}{% endautoescape %}
  // =&gt; &lt;foo&gt;
  </code></pre>
  
  <p>My code:</p>
  
  <pre><code>&lt;script&gt;
  
  {% autoescape false %}
  var all_hotels = {{ hotels | json }};
  var all_restaurants = {{ restaurants | json }};
  var all_things_to_do = {{ things_to_do | json }};
  
  {% endautoescape %}
  
  &lt;/script&gt;
  </code></pre>
  
  <p>Thank you.</p>