WordPress.org

Make WordPress Core

Ticket #19414: 19414.diff

File 19414.diff, 1.1 KB (added by Anatta, 2 years ago)

Patches for wp-includes/functions.php and wp-includes/formatting.php

  • wp-includes/functions.php

     
    46654665function wp_allowed_protocols() { 
    46664666        static $protocols; 
    46674667 
    4668         if ( empty( $protocols ) ) { 
     4668        if ( empty( $protocols ) ) 
    46694669                $protocols = array( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn' ); 
    4670                 $protocols = apply_filters( 'kses_allowed_protocols', $protocols ); 
    4671         } 
     4670         
     4671        $protocols = apply_filters( 'kses_allowed_protocols', $protocols ); 
    46724672 
    46734673        return $protocols; 
    46744674} 
  • wp-includes/formatting.php

     
    23392339        if ( ! is_array( $protocols ) ) 
    23402340                $protocols = wp_allowed_protocols(); 
    23412341        if ( wp_kses_bad_protocol( $url, $protocols ) != $url ) 
    2342                 return ''; 
     2342                $url = ''; 
    23432343 
    23442344        return apply_filters('clean_url', $url, $original_url, $_context); 
    23452345}