Automattic / Automattic/jetpack
Newsletter: allow HTML in Newsletter Welcome message
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
### Impacted plugin
Jetpack
### What
Allow HTML in Newsletter Welcome email.
Currently, we [strip out](https://github.com/Automattic/jetpack/blob/trunk/projects/plugins/jetpack/json-endpoints/class.wpcom-json-api-site-settings-endpoint.php#L837) all HTML other than `` tags from the welcome email.
The [documentation](https://jetpack.com/support/newsletter/customize-the-newsletter-experience/#welcome-email-message) for the Welcome message suggests you are able to use HTML in the message, which is causing confusion for users. See 9604-gh-Automattic/jpop-issues
The current sanitation approach was carried over from other subscription option fields and was not intentionally applied to the welcome message.
There are already [issues](https://github.com/Automattic/jetpack/issues/36581) open to improve the editing UX for the message because currently we only provide a simple textarea for editing the message. In the meantime however, we could still lighten the sanitation approach so users could use HTML if they choose to.
### How
Contributor guide
Research direction
Start at projects/plugins/jetpack/json-endpoints/class.wpcom-json-api-site-settings-endpoint.php around line 837 and trace the sanitation applied to the Newsletter Welcome message. Confirm the welcome email preserves the HTML supported by the documentation while the existing sanitation for other subscription option fields remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- api, backend, content
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100