[wp-trac] [WordPress Trac] #34722: Open P Tag in shortcode related to h tag

WordPress Trac noreply at wordpress.org
Wed Nov 18 13:32:09 UTC 2015


#34722: Open P Tag in shortcode related to h tag
--------------------------+------------------------------
 Reporter:  BackuPs       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Formatting    |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  close         |     Focuses:
--------------------------+------------------------------

Comment (by BackuPs):

 Note

 Try


 {{{
 [theme_div]<h3>Integer in ex vel urna tempor ultrices.</h3>Integer in ex
 vel urna tempor ultrices. Morbi vehicula a orci nec dignissim.[/theme_div]
 }}}


 {{{#!php
 <?php
 function theme_shortcode_div($atts, $content = null, $code) {

         $content = do_shortcode($content);
         $content=wpautop( $content );


         return '<div class="theme-div">' . $content .'</div>';
 }

 add_shortcode('theme_div', 'theme_shortcode_div');
 }}}


 You will notice that the p-tags are close but i still get a empty p-tag
 -right before the h-tag and just after the div opens.... That should not
 be there.

 [[Image(http://i.imgur.com/TLTW6bH.png)]]

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


More information about the wp-trac mailing list