Jetpack Social Preview does not render & properly
Quick summary
The Jetpack Social Preview does not render & symbol properly in Simple sites. It works fine on Atomic Sites.
Steps to reproduce
- Open a simple site and create a new post or page.
- Add & symbol in the title.
- Check Jetpack Social Preview
What you expected to happen
Social Preview should render & symbol correctly.
What actually happened
Social Preview rendered & symbol as &
Context
User report: 24756386-hc
Platform (Simple, Atomic, or both?)
Simple
Theme-specific issue?
No
Browser, operating system and other notes
No response
Reproducibility
Consistent
Severity
All
Available workarounds?
No but the platform is still usable
Workaround details
No response
📌 SCRUBBING : RESULT
- Tested on Simple: Replicated
📌 FINDINGS/SCREENSHOTS/VIDEO
- Replicated issue as described.
- Before publishing the post, when I checked Jetpack Social Preview, the
&rendered in the title, but not in the content of the post. - After publishing the post, the
&was not rendered in either place.
Example: Before Publishing

Example: After Publishing

📌 ACTIONS
- Marked as Triaged for Quality Squad review
Pinging @Automattic/jetpack-reach for this one.
This is an issue with core escaping special characters in the post attributes. I've traced it back to getEditedPostAttribute in the plugin, which accesses a core data store; example code for the title:
https://github.com/Automattic/jetpack/blob/5655e5e419c021d216f27382e4df82af979669cc/projects/js-packages/publicize-components/src/components/social-previews/use-post-data.js#L65-L66
If you use the Jetpack advanced SEO tools, the copy doesn't escape the &, but if we fall back to core's title/description, it will. Examples:
With Jetpack's advanced SEO title/description set:
Fallback to core title/description:
It likely needs to be addressed in core, or we need to decode special characters on the Jetpack side explicitly.