WordPress.org

Make WordPress Core

Ticket #12982: diff-sc.diff

File diff-sc.diff, 763 bytes (added by Atoon, 5 years ago)
  • shortcodes.php

     
    176176        $tagregexp = join( '|', array_map('preg_quote', $tagnames) ); 
    177177 
    178178        // WARNING! Do not change this regex without changing do_shortcode_tag() and strip_shortcodes() 
    179         return '(.?)\[('.$tagregexp.')\b(.*?)(?:(\/))?\](?:(.+?)\[\/\2\])?(.?)'; 
     179        return '(.?)\[('.$tagregexp.')\b((?:[^\[\]]|(?R)|.)*?)(?:(\/))?\](?:(.+?)\[\/\2\])?(.?)'; 
    180180} 
    181181 
    182182/** 
     
    293293        return preg_replace('/'.$pattern.'/s', '$1$6', $content); 
    294294} 
    295295 
    296 add_filter('the_content', 'do_shortcode', 11); // AFTER wpautop() 
     296add_filter('the_content', 'do_shortcode', 9);  
    297297 
    298298?> 
     299 No newline at end of file