[wp-trac] [WordPress Trac] #10702: Support for complex nested shorttags

WordPress Trac noreply at wordpress.org
Thu Nov 1 00:15:07 UTC 2012


#10702: Support for complex nested shorttags
-------------------------+-----------------------------
 Reporter:  pepijndevos  |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  Shortcodes   |     Version:  2.9
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |
-------------------------+-----------------------------

Comment (by Viper007Bond):

 Still a valid bug even with the new shortcode regex although the output
 has changed.

 {{{
 add_shortcode( 'div', 'shortcode_div' );
 function shortcode_div( $atts, $content ) {
         return '<div>' . do_shortcode( $content ) . '</div>';
 }
 }}}

 {{{
 [div][div]test1[/div][div]test2[/div][/div]
 }}}

 {{{
 <div><div></div>test1</div><div>test2</div>[/div]
 }}}

 The first `[/div]` found gets matched with the first `[div]` found,
 resulting in `[div]test1` being the `$content` and then that stand-alone
 shortcode getting expanded.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10702#comment:12>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list