Skip to content

Classic block still displaying unwanted p and br tags when Edit as HTML is chosen #10837

@bobbingwide

Description

@bobbingwide

Describe the bug
Classic block still displaying unwanted p and br tags when Edit as HTML is chosen. These are somewhat misleading. These unwanted/added tags are not saved in the post_content during update.

To Reproduce
Steps to reproduce the behavior:

  1. Using the Classic editor create a post something like this.
Classic block still displaying unwanted p and br tags when Edit as HTML is chosen. These are somewhat misleading. These unwanted/added tags are not saved in the post_content during update.
<!--more-->

[clear]

[bw_csv]A,B,C
1,2,3
4,5,6
[/bw_csv]

end of post
  1. Edit using Gutenberg and see the contents in the Classic block
  2. Choose More Options > Edit as HTML
  3. Notice p and br tags being added.
  4. Edit the text and perform an Update.
  5. View the post.
  6. The unwanted tags have magically disappeared. The content is actually how I want it.

Expected behavior
The Edit as HTML display should not be showing the p and br tags. It's misleading.

Screenshots
If applicable, add screenshots to help explain your problem.

The first screen shot is step 4.
image

The second screen shot is step 7. You can see that I'd edited the content.
In the sidebar you can see the raw post_content that has been saved as wanted.

image

Desktop (please complete the following information):

  • OS: [e.g. iOS] Windows 10
  • Browser [e.g. chrome, safari] Chrome
  • Version [e.g. 22] Version 69.0.3497.100 (Official Build) (64-bit)

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] ClassicAffects the Classic Editor Block[Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions