Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.59k stars 797 forks source link

Enhancement: Preserve line breaks in social media shares #38194

Open alinclamba opened 4 months ago

alinclamba commented 4 months ago

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

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:

And discussed on Slack here:

pablinos commented 4 months ago

I think we use the excerpt which strips all the tags. We can probably change that to allow a minimal amount of tags, and then convert those to line breaks.

pablinos commented 4 months ago

I've put this in 'next up' as we can hopefully get to it pretty quickly. We should probably make a decision about whether to use the post title too.

With 'attached media' there wouldn't be a post title displayed, unless they were using something like Social Image Generator and the title was part of the image.

gmjuhasz commented 4 months ago

I had a change previously that's connected to this: D142892-code We have to check why this is not working anymore