[wp-trac] [WordPress Trac] #37905: Caption shortcode creates non-semantic html in text mode

WordPress Trac noreply at wordpress.org
Fri Apr 19 18:33:31 UTC 2019


#37905: Caption shortcode creates non-semantic html in text mode
--------------------------+-------------------------
 Reporter:  wvndev        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Formatting    |     Version:  4.6
 Severity:  normal        |  Resolution:  worksforme
 Keywords:                |     Focuses:  template
--------------------------+-------------------------
Changes (by desrosj):

 * status:  new => closed
 * resolution:   => worksforme
 * milestone:  Awaiting Review =>


Comment:

 @wvndev @MattyRob My apologies that this ticket fell through the cracks.

 Testing this today, I am seeing the following output using your example
 text:

 {{{
 <div class="entry-content">
         <figure id="attachment_5" aria-describedby="caption-attachment-5"
 style="width: 240px" class="wp-caption alignnone"><img class="size-full
 wp-image-5" src="http://some.site/wp-content/uploads/2016/08/Unknown.jpeg"
 alt="This is the caption text." width="240" height="182" /><figcaption id
 ="caption-attachment-5" class="wp-caption-text">This is the caption
 text.</figcaption></figure>
         <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras
 id metus non tortor suscipit porttutor.</p>
         <p>Integer vel risus vitae neque egestas tempus. Nam vehicula
 laoreet tortor, eget sodales ex tristique quis. Duis eu iaculis orci, at
 varius libero.</p>
 </div><!-- .entry-content -->
 }}}

 This looks correct to me, and matches your expected output with the
 exception of the `<p>` tag wrapping the `<figure>` tag. It's possible this
 was fixed in another ticket, but I was not able to track it down.

 If you are still experiencing the issue, feel free to reopen and provide
 more details to reproduce.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/37905#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list