Bug in do_shortcode_tag (or in input to it)
|Reported by:||shaisachs||Owned by:|
While working with the wp-downloadmanager plugin, I discovered that a shortcode of the form:
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);
In the teaser form, $m 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 = str_replace(' ', ' ', $m); $attr = shortcode_parse_atts($m);
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?