[wp-trac] [WordPress Trac] #9083: Bug in do_shortcode_tag (or in input to it)

WordPress Trac wp-trac at lists.automattic.com
Tue Feb 10 14:26:32 GMT 2009


#9083: Bug in do_shortcode_tag (or in input to it)
--------------------------+-------------------------------------------------
 Reporter:  shaisachs     |       Owner:  anonymous
     Type:  defect (bug)  |      Status:  new      
 Priority:  normal        |   Milestone:  2.7.1    
Component:  General       |     Version:  2.7      
 Severity:  normal        |    Keywords:  shortcode
--------------------------+-------------------------------------------------
 While working with the wp-downloadmanager plugin, I discovered that a
 shortcode of the form:
 [download id="3"]

 Doesn't display anything when the post appears in full-page form.  But it
 does display correctly in teaser form.

 So I dug around a bit, and tracked the problem down to do_shortcode_tag.
 In particular, the different results can be tracked to this line:


 {{{
         $attr = shortcode_parse_atts($m[2]);

 }}}

 In the teaser form, $m[2] is '[download id="3"]'.  In the full-page form,
 it's '[download id="3"]'.  That messes up the call to
 shortcode_parse_atts.

 What I've done for the time being is replaced the above with:


 {{{
         $m[2] = str_replace(' ', ' ', $m[2]);
         $attr = shortcode_parse_atts($m[2]);
 }}}

 That "works", but I suspect there's a deeper problem which I'm perhaps not
 solving.  Am I on the right track here, or is something else going wrong?

-- 
Ticket URL: <http://trac.wordpress.org/ticket/9083>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list