diff --git a/src/wp-admin/comment.php b/src/wp-admin/comment.php index ed93797a64faf..28e8df62e9fad 100644 --- a/src/wp-admin/comment.php +++ b/src/wp-admin/comment.php @@ -205,9 +205,9 @@ $post_id = $comment->comment_post_ID; if ( current_user_can( 'edit_post', $post_id ) ) { $post_link = ""; - $post_link .= esc_html( get_the_title( $post_id ) ) . ''; + $post_link .= wp_kses_post_title( get_the_title( $post_id ) ) . ''; } else { - $post_link = esc_html( get_the_title( $post_id ) ); + $post_link = wp_kses_post_title( get_the_title( $post_id ) ); } echo $post_link; diff --git a/src/wp-admin/edit-form-comment.php b/src/wp-admin/edit-form-comment.php index 375dd61ad955e..6f6da27c49f30 100644 --- a/src/wp-admin/edit-form-comment.php +++ b/src/wp-admin/edit-form-comment.php @@ -184,9 +184,9 @@ $post_id = $comment->comment_post_ID; if ( current_user_can( 'edit_post', $post_id ) ) { $post_link = ""; - $post_link .= esc_html( get_the_title( $post_id ) ) . ''; + $post_link .= wp_kses_post_title( get_the_title( $post_id ) ) . ''; } else { - $post_link = esc_html( get_the_title( $post_id ) ); + $post_link = wp_kses_post_title( get_the_title( $post_id ) ); } ?> diff --git a/src/wp-admin/includes/class-wp-comments-list-table.php b/src/wp-admin/includes/class-wp-comments-list-table.php index 2b927a7f81a6a..0d3b8698ff94f 100644 --- a/src/wp-admin/includes/class-wp-comments-list-table.php +++ b/src/wp-admin/includes/class-wp-comments-list-table.php @@ -1121,9 +1121,9 @@ public function column_response( $comment ) { if ( current_user_can( 'edit_post', $post->ID ) ) { $post_link = ""; - $post_link .= esc_html( get_the_title( $post->ID ) ) . ''; + $post_link .= wp_kses_post_title( get_the_title( $post->ID ) ) . ''; } else { - $post_link = esc_html( get_the_title( $post->ID ) ); + $post_link = wp_kses_post_title( get_the_title( $post->ID ) ); } echo '