diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 27f29382aa..d9ec3aaeaf 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -5,7 +5,7 @@ function wptexturize($text) { $next = true; $output = ''; $curl = ''; - $textarr = preg_split('/(<.*>)/Us', $text, -1, PREG_SPLIT_DELIM_CAPTURE); + $textarr = preg_split('/(<.*>|\[.*\])/Us', $text, -1, PREG_SPLIT_DELIM_CAPTURE); $stop = count($textarr); // if a plugin has provided an autocorrect array, use it @@ -26,7 +26,7 @@ function wptexturize($text) { for ( $i = 0; $i < $stop; $i++ ) { $curl = $textarr[$i]; - if (isset($curl{0}) && '<' != $curl{0} && $next) { // If it's not a tag + if (isset($curl{0}) && '<' != $curl{0} && '[' != $curl{0} && $next) { // If it's not a tag // static strings $curl = str_replace($static_characters, $static_replacements, $curl); // regular expressions diff --git a/wp-includes/shortcodes.php b/wp-includes/shortcodes.php index b90879c30c..d610282b73 100644 --- a/wp-includes/shortcodes.php +++ b/wp-includes/shortcodes.php @@ -129,6 +129,6 @@ function shortcode_atts($pairs, $atts) { return $out; } -add_filter( 'the_content', 'do_shortcode', 9 ); +add_filter('the_content', 'do_shortcode', 11); // AFTER wpautop() ?>