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

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



Built from https://develop.svn.wordpress.org/trunk@56437


git-svn-id: http://core.svn.wordpress.org/trunk@55949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
audrasjb 2023-08-24 09:32:21 +00:00
parent 0b772b84ca
commit 42c9882b46
2 changed files with 3 additions and 3 deletions

View File

@ -104,10 +104,10 @@ switch ( $action ) {
} }
$post_edit_link = get_edit_post_link(); $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. */ /* translators: %s: Post title. */
$h1 = sprintf( __( 'Compare Revisions of &#8220;%s&#8221;' ), $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. // Used in the HTML title tag.
$title = __( 'Revisions' ); $title = __( 'Revisions' );

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.4-alpha-56436'; $wp_version = '6.4-alpha-56437';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.