Ticket #20421: 20421.2.diff
File 20421.2.diff, 1.0 KB (added by , 11 years ago) |
---|
-
wp-includes/kses.php
483 483 if ( empty( $allowed_protocols ) ) 484 484 $allowed_protocols = wp_allowed_protocols(); 485 485 $string = wp_kses_no_null($string); 486 $string = wp_kses_js_entities($string);487 486 $string = wp_kses_normalize_entities($string); 488 487 $string = wp_kses_hook($string, $allowed_html, $allowed_protocols); // WP changed the order of these funcs and added args to wp_kses_hook 489 488 return wp_kses_split($string, $allowed_html, $allowed_protocols); … … 1018 1017 } 1019 1018 1020 1019 /** 1021 * Removes the HTML JavaScript entities found in early versions of Netscape 4.1022 *1023 * @since 1.0.01024 *1025 * @param string $string1026 * @return string1027 */1028 function wp_kses_js_entities($string) {1029 return preg_replace('%&\s*\{[^}]*(\}\s*;?|$)%', '', $string);1030 }1031 1032 /**1033 1020 * Handles parsing errors in wp_kses_hair(). 1034 1021 * 1035 1022 * The general plan is to remove everything to and including some whitespace,