{% extends "notifications/email/_base.html" %} {% comment %} Raw-content escape hatch: request_notification(..., content_html=/content_text=) carries the body in the event payload; this template wraps it in the shared brand layout so ad-hoc notifications still look on-brand without a registered type/template. {% endcomment %} {% block content %} {# `safe` is reachable only through STAPEL_NOTIFICATIONS["RAW_CONTENT"] = "html", a deployment declaring that every producer on its bus is trusted. Under the default ("off") and under "text" the service never passes content_html at all — raw_content.apply_policy drops or de-marks it before the render. The gate is upstream because no template filter can tell branded mail from branded phishing. #} {% if content_html %}{{ content_html|safe }}{% else %}
{{ content_text|linebreaksbr }}
{% endif %} {% endblock %}