WordPress.org

Make WordPress Core

Changeset 23348


Ignore:
Timestamp:
01/25/2013 07:28:47 PM (5 years ago)
Author:
nacin
Message:

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

Merges [23303] to the 3.5 branch.

props mdawaffe.
fixes #23187.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.5/wp-includes/formatting.php

    r22653 r23348  
    26022602    if ( ! is_array( $protocols ) )
    26032603        $protocols = wp_allowed_protocols();
    2604     if ( wp_kses_bad_protocol( $url, $protocols ) != $url )
     2604    $good_protocol_url = wp_kses_bad_protocol( $url, $protocols );
     2605    if ( strtolower( $good_protocol_url ) != strtolower( $url ) )
    26052606        return '';
    26062607
    2607     return apply_filters('clean_url', $url, $original_url, $_context);
     2608    return apply_filters('clean_url', $good_protocol_url, $original_url, $_context);
    26082609}
    26092610
Note: See TracChangeset for help on using the changeset viewer.