diff -r be944660c56a -r 3d72ae0968f4 wp/wp-includes/blocks/post-excerpt.php --- a/wp/wp-includes/blocks/post-excerpt.php Wed Sep 21 18:19:35 2022 +0200 +++ b/wp/wp-includes/blocks/post-excerpt.php Tue Sep 27 16:37:53 2022 +0200 @@ -18,7 +18,13 @@ return ''; } - $more_text = ! empty( $attributes['moreText'] ) ? '' . $attributes['moreText'] . '' : ''; + $excerpt = get_the_excerpt(); + + if ( empty( $excerpt ) ) { + return ''; + } + + $more_text = ! empty( $attributes['moreText'] ) ? '' . wp_kses_post( $attributes['moreText'] ) . '' : ''; $filter_excerpt_more = function( $more ) use ( $more_text ) { return empty( $more_text ) ? $more : ''; }; @@ -38,7 +44,7 @@ } $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) ); - $content = '
' . get_the_excerpt( $block->context['postId'] ); + $content = '
' . $excerpt; $show_more_on_new_line = ! isset( $attributes['showMoreOnNewLine'] ) || $attributes['showMoreOnNewLine']; if ( $show_more_on_new_line && ! empty( $more_text ) ) { $content .= '
' . $more_text . '
';