"""HTML mail: formatting stays, everything active or loading from outside is removed."""
from __future__ import annotations
from app.mailpack import sanitize_html
def test_formatting_stays_and_active_content_goes():
cleaned = sanitize_html(
'
Hallo'
'
x
'
'
'
)
assert 'style="color: #333; font-size: 14px"' in cleaned
assert '' in cleaned
assert 'bgcolor="#eee"' in cleaned and "" in cleaned
for forbidden in ("onclick", "script", "iframe", "