Automattic / Automattic/jetpack

Enhancement: Preserve line breaks in social media shares

Open
#38,194 3 comments 0 reactions 0 assignees View on GitHub
[Feature] Publicize [Plugin] Jetpack [Plugin] Social Enhancement
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:

![download](https://github.com/Automattic/jetpack/assets/6790170/48431939-d0b0-4afc-b847-d415fc040b98)

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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.