Automattic / Automattic/jetpack

Subscriptions: filter out Elementor inline styles from email metadata

Open
#34,841 4 comments 0 reactions 1 assignee Claimed by @edanzer View on GitHub
[Feature] Subscriptions [Focus] Compatibility [Plugin] Jetpack [Pri] Normal [Status] Auto-allocated Bug Customer Report [LEGACY] Earn New Feature
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

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:

```
/*! 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}

Custom Heading Edited in Elementor


```

However, when Jetpack generates the email metadata, it ignores the 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](https://github.com/Automattic/jetpack/assets/14153300/c14a6f08-3bba-4cd3-807c-bf3090c8996e)

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.