Skip to content

Slash post data when receive a subscription update #1310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

chandrapatel
Copy link

Description of the Change

Post data not slashed when receive a subscription update from remote site. So, some post content like [latex] shortcode from MathJax-LaTeX plugin contains slash \ which get removed when updating post.

Original Post

[latex]\delta Z(t)| \approx e^{\lambda t} |\delta (Z(0))|[/latex]

After remote post updated

[latex]delta Z(t)| approx e^{lambda t} |delta (Z(0))|[/latex]

How to test the Change

  • No need to install MathJax-LaTeX plugin on source and destination site.
  • Add [latex]\delta Z(t)| \approx e^{\lambda t} |\delta (Z(0))|[/latex] shortcode to post on source site.
  • Distribute post to external site.
  • [latex] shortcode will migrate correctly on external site because if post is not distributed previously then it distributes using WP Core REST-API and it slash post data.
  • Add tets content to post on original site but keep the shortcode same.
  • External site post will be updated and shortcode will be updated like [latex]delta Z(t)| approx e^{lambda t} |delta (Z(0))|[/latex] where \ removed so shortcode does not render correctly by MathJax-LaTeX plugin.

Changelog Entry

Fixed - Post data not slashed when receive a subscription update

Credits

Props @chandrapatel

Checklist:

@chandrapatel chandrapatel requested a review from a team as a code owner March 29, 2025 17:27
@chandrapatel chandrapatel requested review from peterwilsoncc and removed request for a team March 29, 2025 17:27
@github-actions github-actions bot added this to the 2.2.0 milestone Mar 29, 2025
@github-actions github-actions bot added the needs:code-review This requires code review. label Mar 29, 2025
@peterwilsoncc
Copy link
Collaborator

@chandrapatel I'm having trouble reproducing this, sorry.

I've tested with both the classic and block editors using an external site, are you pushing or pulling to distribute?

@chandrapatel
Copy link
Author

@peterwilsoncc I'm pushing to external site. Did you update the post on the original site after it was distributed for the first time? Because this issue happens when distributed post updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:code-review This requires code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants