Ticket #40353: 40353.5.patch
File 40353.5.patch, 1.0 KB (added by , 7 years ago) |
---|
-
wp-includes/formatting.php
4173 4173 if ( is_wp_error( $value ) ) { 4174 4174 $error = $value->get_error_message(); 4175 4175 } else { 4176 if ( preg_match( '#http(s?)://(.+)#i', $value ) ) {4176 if ( wp_http_validate_url($value) && preg_match( '#http(s?)://(.+)#i', $value ) ) { 4177 4177 $value = esc_url_raw( $value ); 4178 4178 } else { 4179 4179 $error = __( 'The WordPress address you entered did not appear to be a valid URL. Please enter a valid URL.' ); … … 4186 4186 if ( is_wp_error( $value ) ) { 4187 4187 $error = $value->get_error_message(); 4188 4188 } else { 4189 if ( preg_match( '#http(s?)://(.+)#i', $value ) ) {4189 if ( wp_http_validate_url($value) && preg_match( '#http(s?)://(.+)#i', $value ) ) { 4190 4190 $value = esc_url_raw( $value ); 4191 4191 } else { 4192 4192 $error = __( 'The Site address you entered did not appear to be a valid URL. Please enter a valid URL.' );