Coding Standards: Escape the comment post URL in _wp_dashboard_recent_comments_row().

Follow-up to [6705].

Props kebbet.
See #54728.

git-svn-id: https://develop.svn.wordpress.org/trunk@52967 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2022-03-20 17:37:21 +00:00
parent c5e89128d9
commit d584506096

View File

@ -685,7 +685,7 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
if ( $comment->comment_post_ID > 0 ) {
$comment_post_title = _draft_or_post_title( $comment->comment_post_ID );
$comment_post_url = get_the_permalink( $comment->comment_post_ID );
$comment_post_link = "<a href='$comment_post_url'>$comment_post_title</a>";
$comment_post_link = '<a href="' . esc_url( $comment_post_url ) . '">' . $comment_post_title . '</a>';
} else {
$comment_post_link = '';
}