]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/formatting.php
Wordpress 3.5.2
[autoinstalls/wordpress.git] / wp-includes / formatting.php
index 05d7227595d08744656f328917c97e9e4eb3238a..a4e429a7f0b1dfc762b858acb7edb3c9636b6b75 100644 (file)
@@ -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 ) ) );