Ticket #10326: 10326.001.diff

File 10326.001.diff, 751 bytes (added by markjaquith, 3 years ago)
  • wp-includes/shortcodes.php

     
    175175        $tagnames = array_keys($shortcode_tags); 
    176176        $tagregexp = join( '|', array_map('preg_quote', $tagnames) ); 
    177177 
     178        // WARNING! Do not change this regex without changing do_shortcode_tag() and strip_shortcodes() 
    178179        return '(.?)\[('.$tagregexp.')\b(.*?)(?:(\/))?\](?:(.+?)\[\/\2\])?(.?)'; 
    179180} 
    180181 
     
    289290 
    290291        $pattern = get_shortcode_regex(); 
    291292 
    292         return preg_replace('/'.$pattern.'/s', '', $content); 
     293        return preg_replace('/'.$pattern.'/s', '$1$6', $content); 
    293294} 
    294295 
    295296add_filter('the_content', 'do_shortcode', 11); // AFTER wpautop()