Revisions: Add missing escaping function for $post_edit_link in wp-admin/revision.php.

Props nidhidhandhukiya, Presskopp, mukesh27, rajinsharwar, costdev.
Fixes #59141.




git-svn-id: https://develop.svn.wordpress.org/trunk@56437 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jb Audras
2023-08-24 09:30:17 +00:00
parent 7faabe4015
commit f4b36d8941

View File

@@ -104,10 +104,10 @@ switch ( $action ) {
}
$post_edit_link = get_edit_post_link();
$post_title = '<a href="' . $post_edit_link . '">' . _draft_or_post_title() . '</a>';
$post_title = '<a href="' . esc_url( $post_edit_link ) . '">' . _draft_or_post_title() . '</a>';
/* translators: %s: Post title. */
$h1 = sprintf( __( 'Compare Revisions of &#8220;%s&#8221;' ), $post_title );
$return_to_post = '<a href="' . $post_edit_link . '">' . __( '&larr; Go to editor' ) . '</a>';
$return_to_post = '<a href="' . esc_url( $post_edit_link ) . '">' . __( '&larr; Go to editor' ) . '</a>';
// Used in the HTML title tag.
$title = __( 'Revisions' );