-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
Needs TestingNeeds further testing to be confirmed.Needs further testing to be confirmed.[Status] Needs More InfoFollow-up required in order to be actionable.Follow-up required in order to be actionable.[Status] StaleGives the original author opportunity to update before closing. Can be reopened as needed.Gives the original author opportunity to update before closing. Can be reopened as needed.[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
If I save an article such as:
wp_insert_post(['post_content'=>'<!-- wp:paragraph --><p dir="ltr">Hello, world!</p><! -- /wp:paragraph -->']);
When you open the article and save as draft, this function (or something around it) is updating this content to:
<!-- wp:paragraph -->
<p><p dir="ltr">Hello, world!</p></p>
<!-- /wp:paragraph -->
Which Gutenberg then tells the user is an invalid block of content:
Step-by-step reproduction instructions
- Save article:
wp_insert_post(['post_content'=>'<!-- wp:paragraph --><p dir="ltr">Hello, world!</p><! -- /wp:paragraph -->']); - Open article in WP and save as draft.
- Refresh the page.
- Notice the warning about invalid content.
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
- Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
- Yes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Needs TestingNeeds further testing to be confirmed.Needs further testing to be confirmed.[Status] Needs More InfoFollow-up required in order to be actionable.Follow-up required in order to be actionable.[Status] StaleGives the original author opportunity to update before closing. Can be reopened as needed.Gives the original author opportunity to update before closing. Can be reopened as needed.[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
