mirror of
https://github.com/linagora/tmail-flutter.git
synced 2026-12-06 16:04:20 +00:00
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>
core
Core Module