Index: src/wp-includes/formatting.php
===================================================================
--- src/wp-includes/formatting.php	(revision 33407)
+++ src/wp-includes/formatting.php	(working copy)
@@ -614,6 +614,15 @@
 		. ')*+'         // Loop possessively.
 		. '(?:-->)?';   // End of comment. If not found, match all input.
 
+	$cdata =
+		  '!\[CDATA\['  // Start of comment, after the <.
+		. '[^\]]*+'     // Consume non-].
+		. '(?:'         // Unroll the loop: Consume everything until ]]> is found.
+		.     '](?!]>)' // One ] not followed by end of comment.
+		.     '[^\]]*+' // Consume non-].
+		. ')*+'         // Loop possessively.
+		. '(?:]]>)?';   // End of comment. If not found, match all input.
+
 	$regex =
 		  '/('              // Capture the entire match.
 		.     '<'           // Find start of element.
@@ -620,7 +629,11 @@
 		.     '(?(?=!--)'   // Is this a comment?
 		.         $comments // Find end of comment.
 		.     '|'
-		.         '[^>]*>?' // Find end of element. If not found, match all input.
+		.         '(?(?=!\[CDATA\[)' // Is this a comment?
+		.             $cdata // Find end of comment.
+		.         '|'
+		.             '[^>]*>?' // Find end of element. If not found, match all input.
+		.         ')'
 		.     ')'
 		. ')/s';
 
