WordPress.org

Make WordPress Core

Ticket #18268: 18268.2.diff

File 18268.2.diff, 649 bytes (added by SergeyBiryukov, 3 years ago)
  • wp-includes/kses.php

     
    500500 * @return string Filtered content with only allowed HTML elements 
    501501 */ 
    502502function wp_kses($string, $allowed_html, $allowed_protocols = array ()) { 
    503         $allowed_protocols = wp_parse_args( $allowed_protocols, wp_allowed_protocols() ); 
     503        if ( empty( $allowed_protocols ) ) 
     504                $allowed_protocols = wp_allowed_protocols(); 
    504505        $string = wp_kses_no_null($string); 
    505506        $string = wp_kses_js_entities($string); 
    506507        $string = wp_kses_normalize_entities($string);