WordPress.org

Make WordPress Core

Opened 5 months ago

Last modified 3 months ago

#47347 new defect (bug)

HTML error with the multi-level list in Classic Editor

Reported by: sasiddiqui Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.2
Component: Editor Keywords: reporter-feedback
Focuses: Cc:
PR Number:

Description

I have recently created a multi-level list which is throwing HTML validation error:

No p element in scope but a p end tag seen.

This error appears when there is some text between the multi-level list as shown here:

As you see that in Item 1 there is a text and then an unordered list. In this case, extra closing p tag is found in HTML but if the text is removed or the list gets removed then there will be no HTML validation error.

Here is an example link I have created with fresh WordPress install with Twenty Nineteen theme and the Classic Editor plugin.

With Gutenberg: https://dev-site-validation.pantheonsite.io/2019/05/22/testing-multi-level-list-with-gutenberg/

Without Gutenberg: https://dev-site-validation.pantheonsite.io/2019/05/22/testing-multi-level-list-without-gutenberg/

There is no other plugin installed at this time.

Attachments (1)

Screen Shot 2019-05-22 at 4.26.01 PM.png (127.5 KB) - added by sasiddiqui 5 months ago.
showing backend of content

Download all attachments as: .zip

Change History (7)

@sasiddiqui
5 months ago

showing backend of content

#1 @afercia
5 months ago

  • Component changed from General to Editor

This ticket was mentioned in Slack in #core by desrosj. View the logs.


5 months ago

#3 @antpb
5 months ago

  • Keywords reporter-feedback added

@sasiddiqui thanks so much for this report and also including a handy demo! Can you please share a copy of the raw Gutenberg markup and raw Classic Editor markup for this? I want to make sure that I am testing against the same post data that you have. I've structured a post similarly in Classic Editor and Gutenberg using a soft return between list_item_1 with the desired text between the next level list item successfully without extra markup. Maybe I am misunderstanding the reproduction steps. :)

#4 @sasiddiqui
5 months ago

@antpb Here is the copy of what I have tried.
https://docs.google.com/document/d/1aKul8HdbiNUWBULpxrXjb0PHCQKL71FIPpU1xprBM7s/edit?usp=sharing

NOTE: If you copy and paste this directly from the Document then it will create the HTML error or you may add the text directly in the editor as well.

#5 @sasiddiqui
3 months ago

  • Keywords needs-testing added; reporter-feedback removed

Is there any update on it? Does anyone able to produce this issue?

#6 @yasglobal
3 months ago

  • Keywords reporter-feedback added; needs-testing removed

I am also facing this issue. I am testing this with Classic Editor on the latest version of WordPress 5.2.2

Note: See TracTickets for help on using tickets.