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

git-svn-id: http://core.svn.wordpress.org/trunk@24497 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-06-21 19:05:15 +00:00
parent 2ac8311b74
commit 6ed3a582ef

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 );