Index: wp-includes/shortcodes.php
===================================================================
--- wp-includes/shortcodes.php	(revision 11082)
+++ wp-includes/shortcodes.php	(working copy)
@@ -170,12 +170,15 @@
  *
  * @return string The shortcode search regular expression
  */
-function get_shortcode_regex() {
+function get_shortcode_regex($start = false) {
 	global $shortcode_tags;
 	$tagnames = array_keys($shortcode_tags);
 	$tagregexp = join( '|', array_map('preg_quote', $tagnames) );
-
-	return '(.?)\[('.$tagregexp.')\b(.*?)(?:(\/))?\](?:(.+?)\[\/\2\])?(.?)';
+	if ($start) {
+		return '\[('.$tagregexp.')\b';
+	} else {
+		return '(.?)\[('.$tagregexp.')\b(.*?)(?:(\/))?\](?:(.+?)\[\/\2\])?(.?)';
+	}
 }
 
 /**
Index: wp-includes/formatting.php
===================================================================
--- wp-includes/formatting.php	(revision 11082)
+++ wp-includes/formatting.php	(working copy)
@@ -22,6 +22,7 @@
  *
  * @since 0.71
  * @uses $wp_cockneyreplace Array of formatted entities for certain common phrases
+ * @uses get_shortcode_regex() Gets the search pattern for searching shortcodes.
  *
  * @param string $text The text to be formatted
  * @return string The string replaced with html entities
@@ -32,7 +33,11 @@
 	$has_pre_parent = false;
 	$output = '';
 	$curl = '';
-	$textarr = preg_split('/(<.*>|\[.*\])/Us', $text, -1, PREG_SPLIT_DELIM_CAPTURE);
+	$shortcode_regex = get_shortcode_regex();
+	preg_match_all("/$shortcode_regex/s", $text, $shortcode_matches,  PREG_SET_ORDER);
+	// We must replace \2 with \3 from returned regexp since we are adding a capture.
+	$regex = '/(<[^>]*>|' . str_replace('\2', '\3', $shortcode_regex) . ')/s';
+	$textarr = preg_split($regex, $text, -1, PREG_SPLIT_DELIM_CAPTURE);
 	$stop = count($textarr);
 
 	// if a plugin has provided an autocorrect array, use it
@@ -50,10 +55,21 @@
 	$dynamic_characters = array('/\'(\d\d(?:&#8217;|\')?s)/', '/(\s|\A|")\'/', '/(\d+)"/', '/(\d+)\'/', '/(\S)\'([^\'\s])/', '/(\s|\A)"(?!\s)/', '/"(\s|\S|\Z)/', '/\'([\s.]|\Z)/', '/(\d+)x(\d+)/');
 	$dynamic_replacements = array('&#8217;$1','$1&#8216;', '$1&#8243;', '$1&#8242;', '$1&#8217;$2', '$1&#8220;$2', '&#8221;$1', '&#8217;$1', '$1&#215;$2');
 
+	$skip_count = 0;
+	$shortcode_start_regex = "/^" . get_shortcode_regex(true) . "/";
+	$shortcode_idx = 0;
 	for ( $i = 0; $i < $stop; $i++ ) {
 		$curl = $textarr[$i];
 
-		if ( !empty($curl) && '<' != $curl{0} && '[' != $curl{0} && $next && !$has_pre_parent) { // If it's not a tag
+		if ($skip_count > 0) {
+			$skip_count--;
+			continue;
+		} elseif (empty($curl)) {
+			$next = true;
+			continue;
+		}	elseif (preg_match($shortcode_start_regex, ltrim($curl))) { //shortcode
+			$skip_count = count($shortcode_matches[$shortcode_idx++]) - 1;
+		} elseif ('<' != $curl{0} && $next && !$has_pre_parent) { // If it's not a tag
 			// static strings
 			$curl = str_replace($static_characters, $static_replacements, $curl);
 			// regular expressions
