| @@ -29,9 +29,9 @@ | ||
| 29 | 29 | $title = get_the_title( $post ); |
| 30 | 30 | if ( empty( $title ) ) { |
| 31 | 31 | $title = __( '(no title)' ); |
| 32 | 32 | } |
| 33 | - return $title; | |
| 33 | + return esc_html( $title ); | |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | 37 | * Renders the `core/latest-comments` block on server. |
| @@ -41,9 +41,9 @@ | ||
| 41 | 41 | * @return string Returns the post content with latest comments added. |
| 42 | 42 | */ |
| 43 | 43 | function gutenberg_render_block_core_latest_comments( $attributes = array() ) { |
| 44 | 44 | $comments = get_comments( |
| 45 | - /** This filter is documented in wp-includes/widgets/class-wp-widget-recent-comments.php */ | |
| 45 | + // This filter is documented in wp-includes/widgets/class-wp-widget-recent-comments.php. | |
| 46 | 46 | apply_filters( |
| 47 | 47 | 'widget_comments_args', |
| 48 | 48 | array( |
| 49 | 49 | 'number' => $attributes['commentsToShow'], |
| @@ -48,10 +48,9 @@ | ||
| 48 | 48 | array( |
| 49 | 49 | 'number' => $attributes['commentsToShow'], |
| 50 | 50 | 'status' => 'approve', |
| 51 | 51 | 'post_status' => 'publish', |
| 52 | - ), | |
| 53 | - array() | |
| 52 | + ) | |
| 54 | 53 | ) |
| 55 | 54 | ); |
| 56 | 55 | |
| 57 | 56 | $list_items_markup = ''; |