Changeset 62005 for branches/4.8/src/wp-includes/kses.php
- Timestamp:
- 03/13/2026 01:03:05 PM (6 months ago)
- Location:
- branches/4.8
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-includes/kses.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/4.8
- Property svn:mergeinfo changed
/trunk merged: 61879-61884,61886-61887,61890,61913
- Property svn:mergeinfo changed
-
branches/4.8/src/wp-includes/kses.php
r46917 r62005 541 541 $allowed_protocols = wp_allowed_protocols(); 542 542 $string = wp_kses_no_null( $string, array( 'slash_zero' => 'keep' ) ); 543 543 544 544 // Preserve leading and trailing whitespace. 545 545 $matches = array(); … … 553 553 $string = substr( $string, strlen( $lead ), -strlen( $trail ) ); 554 554 } 555 555 556 556 // Parse attribute name and value from input. 557 557 $split = preg_split( '/\s*=\s*/', $string, 2 ); … … 590 590 $vless = 'y'; 591 591 } 592 592 593 593 // Sanitize attribute by name. 594 594 wp_kses_attr_check( $name, $value, $string, $vless, $element, $allowed_html ); … … 1125 1125 $xhtml_slash = ''; 1126 1126 } 1127 1127 1128 1128 // Split it 1129 1129 $attrarr = wp_kses_hair_parse( $attr ); … … 1135 1135 array_unshift( $attrarr, $begin . $slash . $elname ); 1136 1136 array_push( $attrarr, $xhtml_slash . $end ); 1137 1137 1138 1138 return $attrarr; 1139 1139 } … … 1450 1450 $string = str_replace('&', '&', $string); 1451 1451 1452 // Change back the allowed entities in our entity whitelist 1453 $string = preg_replace_callback('/&([A-Za-z]{2,8}[0-9]{0,2});/', 'wp_kses_named_entities', $string); 1454 $string = preg_replace_callback('/&#(0*[0-9]{1,7});/', 'wp_kses_normalize_entities2', $string); 1455 $string = preg_replace_callback('/&#[Xx](0*[0-9A-Fa-f]{1,6});/', 'wp_kses_normalize_entities3', $string); 1452 $string = preg_replace_callback( '/&([A-Za-z]{2,8}[0-9]{0,2});/', 'wp_kses_named_entities', $string ); 1453 $string = preg_replace_callback( '/&#(0*+[1-9][0-9]{0,6});/', 'wp_kses_normalize_entities2', $string ); 1454 $string = preg_replace_callback( '/&#[Xx](0*+[1-9A-Fa-f][0-9A-Fa-f]{0,5});/', 'wp_kses_normalize_entities3', $string ); 1456 1455 1457 1456 return $string;
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)