WordPress.org

Make WordPress Core

Ticket #23187: 23187.diff

File 23187.diff, 661 bytes (added by mdawaffe, 5 years ago)
  • wp-includes/formatting.php

     
    26032603
    26042604        if ( ! is_array( $protocols ) )
    26052605                $protocols = wp_allowed_protocols();
    2606         if ( wp_kses_bad_protocol( $url, $protocols ) != $url )
     2606        $good_protocol_url = wp_kses_bad_protocol( $url, $protocols );
     2607        if ( strtolower( $good_protocol_url ) != strtolower( $url ) )
    26072608                return '';
    26082609
    2609         return apply_filters('clean_url', $url, $original_url, $_context);
     2610        return apply_filters('clean_url', $good_protocol_url, $original_url, $_context);
    26102611}
    26112612
    26122613/**