{% if html_message is defined and html_message %} {{ html_message|safe }} {% else %} {{ message }} {% endif %}