[wp-trac] [WordPress Trac] #31065: Shortcode without closing tag

WordPress Trac noreply at wordpress.org
Tue Jan 20 05:59:42 UTC 2015


#31065: Shortcode without closing tag
--------------------------+----------------------
 Reporter:  rilwis        |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Shortcodes    |     Version:
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |     Focuses:
--------------------------+----------------------
Changes (by pento):

 * status:  new => closed
 * version:  trunk =>
 * resolution:   => invalid
 * milestone:  Awaiting Review =>


Comment:

 Thanks for the bug report!

 This is expected behaviour from the shortcode parser. In your particular
 example, there's no way to tell which `[test]` shortcode the `[/test]`
 closing tag belongs to, so the parser assumes it belongs to the first one
 it encounters.

 If you change your example to this:

 {{{
 echo do_shortcode( '[test][/test][test name="Anh"][/test]' );
 }}}

 It will function as expected.

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


More information about the wp-trac mailing list