[wp-trac] [WordPress Trac] #37328: Empty <p> tag inside <figure> markup

WordPress Trac noreply at wordpress.org
Mon Jul 11 16:07:13 UTC 2016


#37328: Empty <p> tag inside <figure> markup
--------------------------+-----------------------------
 Reporter:  henry.wright  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Editor        |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 {{{
 <figure>
 <img src="image.png" alt="">
 <figcaption>Caption</figcaption>
 </figure>
 }}}

 Using the above markup in the form at Posts > Add New results in an empty
 {{{<p>}}} tag being output. For example:

 {{{
 <figure>
 <img src="image.png" alt=""><p></p>
 <figcaption>Caption</figcaption>
 </figure>
 }}}

 Interesting, if I remove all whitespace from the markup I enter in the
 post form:

 {{{
 <figure><img src="image.png"
 alt=""><figcaption>Caption</figcaption></figure>
 }}}

 ... I get a {{{<br>}}} tag instead of the {{{<p></p>}}}:

 {{{
 <figure><img src="image.png" alt=""><br>
 <figcaption>Caption</figcaption>
 </figure>
 }}}

 I believe the empty {{{<p>}}} is a bug with {{{wpautop()}}}.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37328>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list