Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.57k stars 796 forks source link

Subscriptions: filter out Elementor inline styles from email metadata #34841

Open liviopv opened 6 months ago

liviopv commented 6 months ago

Impacted plugin

Jetpack

What

filter out Elementor inline styles from email metadata

How

When users edit posts with Elementor and add a custom inline style to the first element of their post, Elementor will generate code that looks like this:

<style>/*! elementor - v3.18.0 - 20-12-2023 */
.elementor-heading-title{padding:0;margin:0;line-height:1}.elementor-widget-heading .elementor-heading-title[class*=elementor-size-]>a{color:inherit;font-size:inherit;line-height:inherit}.elementor-widget-heading .elementor-heading-title.elementor-size-small{font-size:15px}.elementor-widget-heading .elementor-heading-title.elementor-size-medium{font-size:19px}.elementor-widget-heading .elementor-heading-title.elementor-size-large{font-size:29px}.elementor-widget-heading .elementor-heading-title.elementor-size-xl{font-size:39px}.elementor-widget-heading .elementor-heading-title.elementor-size-xxl{font-size:59px}</style>
<h1 class="elementor-heading-title elementor-size-default">Custom Heading Edited in Elementor
</h1>

However, when Jetpack generates the email metadata, it ignores the