diff --git a/src/wp-includes/class-wp-query.php b/src/wp-includes/class-wp-query.php index a6c248a7bf..6d2cdfa391 100644 --- a/src/wp-includes/class-wp-query.php +++ b/src/wp-includes/class-wp-query.php @@ -4000,6 +4000,10 @@ class WP_Query { $content = str_replace( "\n", '', $content ); $content = str_replace( "\n", '', $content ); + // Remove the nextpage block delimiters, to avoid invalid block structures in the split content. + $content = str_replace( '', '', $content ); + $content = str_replace( '', '', $content ); + // Ignore nextpage at the beginning of the content. if ( 0 === strpos( $content, '' ) ) $content = substr( $content, 15 );