Index: branches/5.4/src/wp-includes/formatting.php
===================================================================
--- branches/5.4/src/wp-includes/formatting.php	(revision 55785)
+++ branches/5.4/src/wp-includes/formatting.php	(revision 63708)
@@ -573,5 +573,5 @@
 
 	// If a <blockquote> is wrapped with a <p>, move it inside the <blockquote>.
-	$pee = preg_replace( '|<p><blockquote([^>]*)>|i', '<blockquote$1><p>', $pee );
+	$pee = preg_replace( '!<p><blockquote((?:[^>"\']|"[^"]*"|\'[^\']*\')*)>!i', '<blockquote$1><p>', $pee );
 	$pee = str_replace( '</blockquote></p>', '</p></blockquote>', $pee );
 
