X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/00dbffaf1593b0ac719d98f00839221a9ca52133..refs/tags/wordpress-3.5.2:/wp-includes/formatting.php diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 05d72275..a4e429a7 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -2601,10 +2601,11 @@ function esc_url( $url, $protocols = null, $_context = 'display' ) { if ( ! is_array( $protocols ) ) $protocols = wp_allowed_protocols(); - if ( wp_kses_bad_protocol( $url, $protocols ) != $url ) + $good_protocol_url = wp_kses_bad_protocol( $url, $protocols ); + if ( strtolower( $good_protocol_url ) != strtolower( $url ) ) return ''; - return apply_filters('clean_url', $url, $original_url, $_context); + return apply_filters('clean_url', $good_protocol_url, $original_url, $_context); } /** @@ -2869,7 +2870,7 @@ function sanitize_option($option, $value) { case 'illegal_names': if ( ! is_array( $value ) ) - $value = explode( "\n", $value ); + $value = explode( ' ', $value ); $value = array_values( array_filter( array_map( 'trim', $value ) ) );