ShortCode and extra

I discover that it’s a know bug, and will be fix in future release Reference here So then, i used this code… not pretty, but do the magic !, thanks

$content = do_shortcode( shortcode_unautop( $content ) );
if ( '</p>' == substr( $content, 0, 4 )
and '<p>' == substr( $content, strlen( $content ) - 3 ) )
    $content = substr( $content, 4, strlen( $content ) - 7 );
return '<div my stuff>' . $content . '</div>';