From e0573ef18a3d581647f8b6464ef71d8fce269864 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Fri, 21 Jun 2013 19:05:15 +0000 Subject: [PATCH] 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 --- wp-includes/class-http.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-http.php b/wp-includes/class-http.php index 91d06c49ff..50e18f99d6 100644 --- a/wp-includes/class-http.php +++ b/wp-includes/class-http.php @@ -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 );