Only call wp_kses_bad_protocol() in WP_HTTP if it exists. It does not in setup-config.php.

git-svn-id: https://develop.svn.wordpress.org/trunk@24497 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2013-06-21 19:05:15 +00:00
parent 46022a51de
commit e0573ef18a
1 changed files with 2 additions and 1 deletions

View File

@ -121,7 +121,8 @@ class WP_Http {
if ( $r['reject_unsafe_urls'] )
$url = wp_http_validate_url( $url );
$url = wp_kses_bad_protocol( $url, array( 'http', 'https', 'ssl' ) );
if ( function_exists( 'wp_kses_bad_protocol' ) )
$url = wp_kses_bad_protocol( $url, array( 'http', 'https', 'ssl' ) );
$arrURL = @parse_url( $url );