diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php
index 5d87da2890..3e2cd0697e 100644
a
|
b
|
function wp_handle_comment_submission( $comment_data ) { |
3633 | 3633 | return new WP_Error( 'require_valid_email', __( '<strong>Error:</strong> Please enter a valid email address.' ), 200 ); |
3634 | 3634 | } |
3635 | 3635 | } |
| 3636 | |
| 3637 | // Check validation for safe url. |
| 3638 | if ( '' !== $comment_author_url && ! $user->exists() && empty( wp_http_validate_url( $comment_author_url ) ) ) { |
| 3639 | return new WP_Error( 'require_valid_url', __( '<strong>Error:</strong> Website url is invalid.' ), 200 ); |
| 3640 | } |
3636 | 3641 | |
3637 | 3642 | $commentdata = array( |
3638 | 3643 | 'comment_post_ID' => $comment_post_id, |