Treat URL schemes as case insensitive when sanitizing them in esc_url().
Merges [23303] to the 3.5 branch. props mdawaffe. fixes #23187. git-svn-id: http://core.svn.wordpress.org/branches/3.5@23348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
177479d46c
commit
d229e92d14
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue