title: why to use " | safe" in jinja2 Python
body: <p>I am following a Flask tutorial where he is using " | safe " in jinja2 template. Why do we need this pipe symbol and safe?</p>
  
  <p>without using safe it prints all html tags.</p>
  
  <p>By using <code>| safe</code>, it shows proper formatting.  Why does it work this way?</p>
  
  <p>Below is the jinja2 code:</p>
  
  <pre><code>{% extends "layout.html" %}
  
  {% block body %}
      &lt;h1&gt;{{article.title}}&lt;/h1&gt;
      &lt;small&gt;Written by {{article.author}} on {{article.create_date}}&lt;/small&gt;
      &lt;hr&gt;
      &lt;div&gt;
          {{article.body | safe}}
      &lt;/div&gt;
  {% endblock %}
  </code></pre>