Automattic / Automattic/jetpack
Enhancement: Preserve line breaks in social media shares
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
### Impacted plugin
Jetpack, Social
### What
When sharing posts to social media via Jetpack, the line breaks from the original post are not preserved. This results in the loss of formatting and can make posts harder to read.
Social Preview keeps the line breaks:

But the post when automatically shared to Facebook, will lose these line breaks.
Can we let Jetpack to preserve the line breaks from the original post when sharing to social media platforms such as Facebook.
The issue was initially reported by a user here:
- https://wordpress.org/support/topic/loses-title-of-post-line-breaks/#post-17868118
And discussed on Slack here:
- p1720004046966949/1720004038.239749-slack-C02JJ910CNL
Contributor guide
Research direction
Start by tracing the Jetpack Social automatic-sharing flow described in the issue and compare it with the Social Preview behavior. Confirm how Facebook currently receives the post content, then verify that line breaks from the original post are preserved when the share is generated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- content
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100