diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php
index 4e8f63d..38c8a28 100644
|
a
|
b
|
function sanitize_option( $option, $value ) { |
| 4159 | 4159 | if ( is_wp_error( $value ) ) { |
| 4160 | 4160 | $error = $value->get_error_message(); |
| 4161 | 4161 | } else { |
| 4162 | | if ( preg_match( '#http(s?)://(.+)#i', $value ) ) { |
| | 4162 | if ( preg_match( '#http(s?)://(.+)#i', $value ) && filter_var($value, FILTER_VALIDATE_URL) !== false) { |
| 4163 | 4163 | $value = esc_url_raw( $value ); |
| 4164 | 4164 | } else { |
| 4165 | 4165 | $error = __( 'The WordPress address you entered did not appear to be a valid URL. Please enter a valid URL.' ); |
| … |
… |
function sanitize_option( $option, $value ) { |
| 4172 | 4172 | if ( is_wp_error( $value ) ) { |
| 4173 | 4173 | $error = $value->get_error_message(); |
| 4174 | 4174 | } else { |
| 4175 | | if ( preg_match( '#http(s?)://(.+)#i', $value ) ) { |
| | 4175 | if ( preg_match( '#http(s?)://(.+)#i', $value ) && filter_var($value, FILTER_VALIDATE_URL) !== false) { |
| 4176 | 4176 | $value = esc_url_raw( $value ); |
| 4177 | 4177 | } else { |
| 4178 | 4178 | $error = __( 'The Site address you entered did not appear to be a valid URL. Please enter a valid URL.' ); |