Commit Graph

8 Commits (1ae5fa77a6a2178bfbdce0a05be9592ccab12886)

Author SHA1 Message Date
Tran Thanh Phuc 4988a1400b [MIG] mail_inline_css: Migration to 14.0 2024-03-04 23:23:38 +07:00
Simone Orsi ccc5b27793 mail_inline_css: fix transform hook
The mail module offers a better hook to manipulate html: `render_post_process`.
By using this, we make sure the transform is applied properly
before html tags sanitizing happens,
which can alter - if not screw - the final result.

Finally, it simplifies code :)
2024-03-04 23:23:38 +07:00
Guewen Baconnier 6429d5faa6 Fix issue on empty template with premailer
If premailer receives an empty value, such as an empty string,
on parsing, it returns None and fails when trying to call
'etree.fromstring()' on this None result.

We should avoid to call premailer on an empty string, as the result
will anyway not change.

We may have an empty template for instance when a template could not
compile due to a mistake.
2024-03-04 23:23:38 +07:00
Simone Orsi 601f6ded4a [MIG] mail_inline_css: Migration to 13.0 2024-03-04 23:23:38 +07:00
Simone Orsi 1e146770cb [REF] mail_inline_css: apply pre-commit 2024-03-04 23:23:38 +07:00
Simone Orsi e09f4f4ddd mail_inline_css: unify premailer transform apply 2024-03-04 23:23:38 +07:00
mpanarin 1067dbe414 [IMP] mail_inline_css: allow passing options to premailer 2024-03-04 23:23:38 +07:00
Timon Tschanz 147c7d286d [IMP] mail_inline_css: Improve and add test cov 2024-03-04 23:23:38 +07:00