WordPress.org

Make WordPress Core

Ticket #6444: 6444.001.diff

File 6444.001.diff, 1.2 KB (added by markjaquith, 14 years ago)
  • wp-includes/shortcodes.php

     
    129129        return $out;
    130130}
    131131
    132 add_filter( 'the_content', 'do_shortcode', 9 );
     132add_filter('the_content', 'do_shortcode', 11); // AFTER wpautop()
    133133
    134134?>
  • wp-includes/formatting.php

     
    55        $next = true;
    66        $output = '';
    77        $curl = '';
    8         $textarr = preg_split('/(<.*>)/Us', $text, -1, PREG_SPLIT_DELIM_CAPTURE);
     8        $textarr = preg_split('/(<.*>|\[.*\])/Us', $text, -1, PREG_SPLIT_DELIM_CAPTURE);
    99        $stop = count($textarr);
    1010
    1111        // if a plugin has provided an autocorrect array, use it
     
    2626        for ( $i = 0; $i < $stop; $i++ ) {
    2727                $curl = $textarr[$i];
    2828
    29                 if (isset($curl{0}) && '<' != $curl{0} && $next) { // If it's not a tag
     29                if (isset($curl{0}) && '<' != $curl{0} && '[' != $curl{0} && $next) { // If it's not a tag
    3030                        // static strings
    3131                        $curl = str_replace($static_characters, $static_replacements, $curl);
    3232                        // regular expressions