{{ _('Hi %(user)s', user=recipient.first_name) }},
{# `string` drops the `__html__` of LazyString, which would skip autoescaping what it interpolates. Only `ParagraphWithLinks` is HTML: it escapes its values itself. #} {% for item in message.paragraphs %} {% if item.__class__.__name__ == 'MailCTA' %} {% elif item.__class__.__name__ == 'LabelledContent' %} {% if item.inline %}{{ item.label|string }} {{ item.truncated_content }}
{% else %}{{ item.label|string }}
{{ item.truncated_content }}
{% endif %} {% elif item.__class__.__name__ == 'ParagraphWithLinks' %}{{ item.html|safe }}
{% else %}{{ item|string }}
{% endif %} {% endfor %}{{ _('Have a great day') }},
{{ _('The %(site)s team', site=config.SITE_TITLE) }}
{% if message.footer %}{{ item|string }}
{% endif %} {% endfor %}