X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/76aea3697c6043c1613370f172395b4f65ee71f0..67ba21ec17b4640df9bbe7701072d10ab2b05b63:/wp-admin/page.php diff --git a/wp-admin/page.php b/wp-admin/page.php index 3e8ae30a..68a66902 100644 --- a/wp-admin/page.php +++ b/wp-admin/page.php @@ -1,12 +1,29 @@ ID) ) wp_die( __("You attempted to edit a page that doesn't exist. Perhaps it was deleted?") ); + if ( empty($post->ID) ) wp_die( __('You attempted to edit a page that doesn’t exist. Perhaps it was deleted?') ); if ( 'page' != $post->post_type ) { wp_redirect( get_edit_post_link( $post_ID, 'url' ) ); @@ -87,7 +100,7 @@ case 'edit': if ( $last = wp_check_post_lock( $post->ID ) ) { $last_user = get_userdata( $last ); $last_user_name = $last_user ? $last_user->display_name : __('Somebody'); - $message = sprintf( __( 'Warning: %s is currently editing this page' ), wp_specialchars( $last_user_name ) ); + $message = sprintf( __( 'Warning: %s is currently editing this page' ), esc_html( $last_user_name ) ); $message = str_replace( "'", "\'", "
$message