Skip to content
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

Unicode characters are not escaped during syndication #889

Closed
1 task done
amalajith opened this issue Jun 8, 2022 · 2 comments · Fixed by #890
Closed
1 task done

Unicode characters are not escaped during syndication #889

amalajith opened this issue Jun 8, 2022 · 2 comments · Fixed by #890
Assignees
Labels
type:bug Something isn't working.
Milestone

Comments

@amalajith
Copy link
Contributor

amalajith commented Jun 8, 2022

Describe the bug

During syndication, both pull and push, if a WordPress Gutenberg block enabled post content has Unicode characters in block attributes, I expect the Unicode characters to be slashed so that WordPress does not remove the slashes when pulling the syndicated posts. At the moment, WordPress strips out the slashes, so it creates invalid text strings in the post content of the syndicated post.

Steps to Reproduce

  1. Create a custom Gutenberg block with the following attributes title, description.
  2. Add some test content and save it so that the post content is now available in the database with the title and description attributes.
  3. Replace the attributes with following code snippet which has encoded content in the title and description attributes of the post content.
  4. Make the post available for syndication
  5. Pull the post on the multisite.
  6. WordPress strips of the slashes creating the character encoding issue as shown in the screenshot below.

Screenshots, screen recording, code snippet

image

 {"title":"Our 11 Objectives","description":"\u003cstrong\u003eEnvironment\u003c/strong\u003e \u003cbr\u003e\u003cbr\u003e\u003cstrong\u003eObjective 01\u003c/strong\u003e \u003cbr\u003eBe carbon neutral for our own operations no later than 2025 and across our supply chain by 2030, and committed to becoming a net zero business well ahead of 2050\u003cbr\u003e\u003cbr\u003e\u003cstrong\u003eObjective 02\u003c/strong\u003e \u003cbr\u003eTransition to 100% renewable electricity by 2025, and electric vehicles by 2030\u003cbr\u003e\u003cbr\u003e\u003cstrong\u003eObjective 03 \u003c/strong\u003e\u003cbr\u003eHelp our clients to save 10m tons of Co2 eq by 2030\u003cbr\u003e\u003cbr\u003e\u003ca Find out more on environmental sustainability\u003c/a\u003e"}

Environment information

No response

WordPress information

WordPress is managed by the WordPress VIP

Code of Conduct

  • I agree to follow this project's Code of Conduct
@amalajith amalajith added the type:bug Something isn't working. label Jun 8, 2022
@TomaGap
Copy link

TomaGap commented Jun 8, 2022

Yes Looks good

@jeffpaul jeffpaul added this to the 1.7.0 milestone Jun 8, 2022
@jeffpaul jeffpaul moved this to Incoming in Open Source Practice Jun 8, 2022
@jeffpaul jeffpaul moved this from Incoming to In Review in Open Source Practice Jun 8, 2022
@jeffpaul
Copy link
Member

jeffpaul commented Jun 8, 2022

@amalajith welcome to Distributor, thanks for the report, and for the resulting PR! We'll get the PR through review and get back to you with any questions or concerns, thanks again!

Repository owner moved this from In Review to Merged in Open Source Practice Jul 21, 2022
@vikrampm1 vikrampm1 moved this from Merged to Done/Released in Open Source Practice Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants