[wp-trac] [WordPress Trac] #39307: </p> tag inserted in <figure>
WordPress Trac
noreply at wordpress.org
Wed Dec 21 00:26:18 UTC 2016
#39307: </p> tag inserted in <figure>
------------------------------------------+--------------------
Reporter: sujag | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.7.1
Component: Formatting | Version: 4.7
Severity: normal | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses:
------------------------------------------+--------------------
Changes (by pento):
* keywords: => needs-patch needs-unit-tests
* milestone: Awaiting Review => 4.7.1
Comment:
I think this needs to be fixed with an exception in `wpautop()`, similar
to object tags - the assumption is that flow elements inside of block
elements (in this case, `<img>` inside `<figure>`), need to be wrapped in
a `<p>`, but that's not the normal use case for `<figure>`, which is
usually just an `<img>` and `<figcaption>` (in either order).
Things get a little weird with spacing inside of block elements (see
#38656), the tests for this should ensure that fun combinations of spacing
and ordering don't make it go haywire.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39307#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list