Ticket #40353: 40353.3.patch
File 40353.3.patch, 1.1 KB (added by , 7 years ago) |
---|
-
src/wp-includes/formatting.php
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 ( !empty( $value ) && 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.' ); … … 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 ( !empty( $value ) && 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.' );