Files
tmail-flutter/core
Benoit TELLIERandClaude Opus 5.5 a76b6dd519 fix(html): apply property allow-list and url() validation to nested CSS
The sanitize_html fork preserves stylesheets containing nested blocks
(@media, @supports, @keyframes, @font-face...) after a token blocklist
only, skipping the CSS property allow-list applied to flat stylesheets.
Received emails could therefore use arbitrary properties (e.g. fixed
positioned overlays redressing the UI) and at-rules fetching remote
resources.

Add SanitizeNestedStyleTransformer, run after the sanitizer in the
viewer, standard, reply/forward and signature pipelines:
- keep @media blocks with their rules sanitized,
- drop every other at-rule,
- sanitize plain rules with the fork's CssSanitizer.

The same fix should eventually move into the sanitize_html fork itself.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 10:55:06 +02:00
..
2022-09-29 16:51:50 +07:00
2021-07-29 11:42:41 +07:00
2021-07-29 11:42:41 +07:00