Make WordPress Core


Ignore:
Timestamp:
03/20/2022 05:37:21 PM (2 years ago)
Author:
SergeyBiryukov
Message:

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

Follow-up to [6705].

Props kebbet.
See #54728.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/dashboard.php

    r52957 r52967  
    686686        $comment_post_title = _draft_or_post_title( $comment->comment_post_ID );
    687687        $comment_post_url   = get_the_permalink( $comment->comment_post_ID );
    688         $comment_post_link  = "<a href='$comment_post_url'>$comment_post_title</a>";
     688        $comment_post_link  = '<a href="' . esc_url( $comment_post_url ) . '">' . $comment_post_title . '</a>';
    689689    } else {
    690690        $comment_post_link = '';
Note: See TracChangeset for help on using the changeset viewer.