diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php index 9539987ae7..94f60dfaef 100644 --- a/src/wp-includes/comment.php +++ b/src/wp-includes/comment.php @@ -615,9 +615,10 @@ function sanitize_comment_cookies() { * * @param string $author_cookie The comment author name cookie. */ - $comment_author = apply_filters( 'pre_comment_author_name', $_COOKIE[ 'comment_author_' . COOKIEHASH ] ); - $comment_author = wp_unslash( $comment_author ); - $comment_author = esc_attr( $comment_author ); + $comment_author = apply_filters( 'pre_comment_author_name', $_COOKIE[ 'comment_author_' . COOKIEHASH ] ); + $comment_author = wp_unslash( $comment_author ); + $comment_author = esc_attr( $comment_author ); + $_COOKIE[ 'comment_author_' . COOKIEHASH ] = $comment_author; } @@ -632,9 +633,10 @@ function sanitize_comment_cookies() { * * @param string $author_email_cookie The comment author email cookie. */ - $comment_author_email = apply_filters( 'pre_comment_author_email', $_COOKIE[ 'comment_author_email_' . COOKIEHASH ] ); - $comment_author_email = wp_unslash( $comment_author_email ); - $comment_author_email = esc_attr( $comment_author_email ); + $comment_author_email = apply_filters( 'pre_comment_author_email', $_COOKIE[ 'comment_author_email_' . COOKIEHASH ] ); + $comment_author_email = wp_unslash( $comment_author_email ); + $comment_author_email = esc_attr( $comment_author_email ); + $_COOKIE[ 'comment_author_email_' . COOKIEHASH ] = $comment_author_email; } @@ -649,8 +651,9 @@ function sanitize_comment_cookies() { * * @param string $author_url_cookie The comment author URL cookie. */ - $comment_author_url = apply_filters( 'pre_comment_author_url', $_COOKIE[ 'comment_author_url_' . COOKIEHASH ] ); - $comment_author_url = wp_unslash( $comment_author_url ); + $comment_author_url = apply_filters( 'pre_comment_author_url', $_COOKIE[ 'comment_author_url_' . COOKIEHASH ] ); + $comment_author_url = wp_unslash( $comment_author_url ); + $_COOKIE[ 'comment_author_url_' . COOKIEHASH ] = $comment_author_url; } }