{% if format == 'txt' %}
{{ preview.text_body|safe }}
{% else %} {{ preview.html_body|safe }} {% endif %}