Make WordPress Core

Changeset 23303


Ignore:
Timestamp:
01/17/2013 03:07:32 PM (12 years ago)
Author:
nacin
Message:

Treat URL schemes as case insensitive when sanitizing them in esc_url().

props mdawaffe.
fixes #23187.
tests: [1184/tests]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/formatting.php

    r23265 r23303  
    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
Note: See TracChangeset for help on using the changeset viewer.