Skip to content

hr HTML tags Breaking Paragraph Blocks and Classic Revisions Unless it's Inside <!-- wp:separator --> #66467

@Robertght

Description

@Robertght

Description

This report originates from Automattic/wp-calypso#94184

There are two issues here:

Adding an HTML code that code that contains the


code results in an eventually broken block. Block recovery attempts recovers what's before the
tag but not what's after it.

If using classic revisions (wp-admin). If a revision contains that


tag, all the content will be visible in the revisions view but anything under the tag will not be included in the restored version.

Step-by-step reproduction instructions

Using Gutenberg, on any post.
Add a paragraph block and write anything - "Test"
Edit the paragraph block as HTML and add an


to the end or anywhere on the paragraph, but inside the

followed by some text.
Click Edit visually.
You will get an Attempt Block Recovery button
Clicking it removes the


tag and all that's after it

Screenshots, screen recording, code snippet

https://d.pr/v/SbGOoZ (for some reason I can't embed this here)

Environment info

  • WordPress 6.6.2
  • Gutenberg 19.5.0

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

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions