Make WordPress Core

Ticket #20421: 20421.2.diff

File 20421.2.diff, 1.0 KB (added by Ipstenu, 11 years ago)

Refreshing patch because it's now 2014.

  • wp-includes/kses.php

     
    483483        if ( empty( $allowed_protocols ) )
    484484                $allowed_protocols = wp_allowed_protocols();
    485485        $string = wp_kses_no_null($string);
    486         $string = wp_kses_js_entities($string);
    487486        $string = wp_kses_normalize_entities($string);
    488487        $string = wp_kses_hook($string, $allowed_html, $allowed_protocols); // WP changed the order of these funcs and added args to wp_kses_hook
    489488        return wp_kses_split($string, $allowed_html, $allowed_protocols);
     
    10181017}
    10191018
    10201019/**
    1021  * Removes the HTML JavaScript entities found in early versions of Netscape 4.
    1022  *
    1023  * @since 1.0.0
    1024  *
    1025  * @param string $string
    1026  * @return string
    1027  */
    1028 function wp_kses_js_entities($string) {
    1029         return preg_replace('%&\s*\{[^}]*(\}\s*;?|$)%', '', $string);
    1030 }
    1031 
    1032 /**
    10331020 * Handles parsing errors in wp_kses_hair().
    10341021 *
    10351022 * The general plan is to remove everything to and including some whitespace,