[wp-trac] [WordPress Trac] #48256: WP remove first <p> in <td>
WordPress Trac
noreply at wordpress.org
Mon Nov 23 04:18:22 UTC 2020
#48256: WP remove first <p> in <td>
------------------------------------------+-----------------------------
Reporter: Sebafaim | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Editor | Version: 5.2.3
Severity: major | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses:
------------------------------------------+-----------------------------
Changes (by noisysocks):
* keywords: needs-patch 2nd-opinion => needs-patch needs-unit-tests
* milestone: Awaiting Review => Future Release
Comment:
I was able to confirm this by pasting this into the Code Editor and
previewing the page.
{{{
<div>
<img src="https://source.unsplash.com/random/800x600" alt=""
width="800" height="600" />
<p>Here is some paragraph</p>
</div>
}}}
There is an extraneous `</p>` which is invalid HTML.
Looks like a bug with wpautop. We should add tests that cover the edge
case. Invalid HTML should never be produced.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48256#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list