Skip to content

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

Open

Description

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 <style> tag and treats what's inside as if it was content from the post, which causes email providers to interpret it as the email description:

CleanShot 2024-01-03 at 17 49 27@2x

Ideally, Jetpack should filter out anything inside a <style> tag when generating new post emails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Customer ReportIssues or PRs that were reported via Happiness. Previously known as "Happiness Request".EarnEarn features[Feature] SubscriptionsAll subscription-related things such as paid and unpaid, user management, and newsletter settings.[Focus] CompatibilityEnsuring our products play well with third-parties[Plugin] JetpackIssues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/[Type] BugWhen a feature is broken and / or not performing as intended[Type] Feature Request

Type

No type

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions