Ticket #11311: 11311-2.patch
File 11311-2.patch, 809 bytes (added by , 8 years ago) |
---|
-
wp-includes/kses.php
1426 1426 */ 1427 1427 function wp_kses_normalize_entities($string) { 1428 1428 // Disarm all entities by converting & to & 1429 $string = str_replace(' & ', ' %%ampplaceholder%% ', $string); 1429 1430 $string = str_replace('&', '&', $string); 1430 1431 1431 1432 // Change back the allowed entities in our entity whitelist … … 1433 1434 $string = preg_replace_callback('/&#(0*[0-9]{1,7});/', 'wp_kses_normalize_entities2', $string); 1434 1435 $string = preg_replace_callback('/&#[Xx](0*[0-9A-Fa-f]{1,6});/', 'wp_kses_normalize_entities3', $string); 1435 1436 1437 $string = str_replace(' %%ampplaceholder%% ', ' & ', $string); 1438 1436 1439 return $string; 1437 1440 } 1438 1441