diff --git a/src/wp-includes/revision.php b/src/wp-includes/revision.php
index b4ecf0c863..ca869a94ce 100644
--- a/src/wp-includes/revision.php
+++ b/src/wp-includes/revision.php
@@ -741,7 +741,7 @@ function _show_post_preview() {
 		$id = (int) $_GET['preview_id'];
 
 		if ( false === wp_verify_nonce( $_GET['preview_nonce'], 'post_preview_' . $id ) ) {
-			wp_die( __( 'Sorry, you are not allowed to preview drafts.' ), 403 );
+			wp_die( esc_html__( 'Sorry, you are not allowed to preview drafts.' ), 403 );
 		}
 
 		add_filter( 'the_preview', '_set_preview' );
@@ -766,7 +766,7 @@ function _wp_preview_terms_filter( $terms, $post_id, $taxonomy ) {
 		return $terms;
 	}
 
-	if ( empty( $_REQUEST['post_format'] ) || $post->ID != $post_id
+	if ( empty( $_REQUEST['post_format'] ) || $post->ID !== $post_id
 		|| 'post_format' !== $taxonomy || 'revision' === $post->post_type
 	) {
 		return $terms;
@@ -804,10 +804,10 @@ function _wp_preview_post_thumbnail_filter( $value, $post_id, $meta_key ) {
 
 	if ( empty( $_REQUEST['_thumbnail_id'] ) ||
 		empty( $_REQUEST['preview_id'] ) ||
-		$post->ID != $post_id ||
+		$post->ID !== $post_id ||
 		'_thumbnail_id' !== $meta_key ||
 		'revision' === $post->post_type ||
-		$post_id != $_REQUEST['preview_id'] ) {
+		$post_id !== $_REQUEST['preview_id'] ) {
 
 		return $value;
 	}
