[wp-trac] [WordPress Trac] #20740: strip_shortcodes Chokes On Empty Shortcodes

WordPress Trac noreply at wordpress.org
Wed Sep 18 15:45:38 UTC 2013


#20740: strip_shortcodes Chokes On Empty Shortcodes
--------------------------+------------------------------
 Reporter:  MathSmath     |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Shortcodes    |     Version:  3.3.2
 Severity:  minor         |  Resolution:  worksforme
 Keywords:                |
--------------------------+------------------------------
Changes (by ericlewis):

 * status:  new => closed
 * resolution:   => worksforme


Comment:

 Can not reproduce with either of these code samples:

 {{{
 <?php
 $content = '[caption id="attachment_3360" width="288" caption="Some
 caption"][/caption]';
 $content = strip_shortcodes($content);
 var_dump( $content ); // result: string(0)
 }}}


 {{{
 <?php
 $content = '[caption][/caption]
 Lorem ipsum dolor sit amet, consectetur adipiscing elit.
 [caption][/caption]';
 $content = strip_shortcodes($content);
 var_dump( $content ); // result: string(0)
 }}}

 Closing out.

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


More information about the wp-trac mailing list