--- a/wp-admin/edit-comments.php
+++ b/wp-admin/edit-comments.php
@@ -1,7 +1,6 @@
-$comment_status = wp_unslash( $_REQUEST['comment_status'] );
-
-$delete_time    = wp_unslash( $_REQUEST['pagegen_timestamp'] );
-
-$messages[] = __( 'This comment is already approved.' ) . sprintf(
-    ' <a href="%1$s">%2$s</a>',
-    esc_url( admin_url( "comment.php?action=editcomment&c=$same" ) ),
-    __( 'Edit comment' )
+$comment_status = sanitize_key( wp_unslash( $_REQUEST['comment_status'] ) );
+
+$delete_time    = sanitize_text_field( wp_unslash( $_REQUEST['pagegen_timestamp'] ) );
+
+$messages[] = sprintf(
+    __( 'This comment is already approved. <a href="%s">Edit comment</a>' ),
+    esc_url( admin_url( "comment.php?action=editcomment&c=$same" ) )
 );
