WordPress.org

Make WordPress Core

Ticket #21974: 21974.2.patch

File 21974.2.patch, 537 bytes (added by SergeyBiryukov, 12 months ago)
  • wp-includes/formatting.php

     
    26322632 
    26332633        if ( ! is_array( $protocols ) ) 
    26342634                $protocols = wp_allowed_protocols(); 
    2635         $good_protocol_url = wp_kses_bad_protocol( $url, $protocols ); 
     2635        $good_protocol_url = ( '/' != $url[0] ) ? wp_kses_bad_protocol( $url, $protocols ) : $url; 
    26362636        if ( strtolower( $good_protocol_url ) != strtolower( $url ) ) 
    26372637                return ''; 
    26382638