Changeset 62003 for branches/5.0/src/wp-includes/kses.php
- Timestamp:
- 03/13/2026 12:41:24 PM (5 months ago)
- Location:
- branches/5.0
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-includes/kses.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0
- Property svn:mergeinfo changed
/trunk merged: 61879-61884,61886-61887,61890,61913
- Property svn:mergeinfo changed
-
branches/5.0/src/wp-includes/kses.php
r46915 r62003 544 544 $allowed_protocols = wp_allowed_protocols(); 545 545 $string = wp_kses_no_null( $string, array( 'slash_zero' => 'keep' ) ); 546 546 547 547 // Preserve leading and trailing whitespace. 548 548 $matches = array(); … … 556 556 $string = substr( $string, strlen( $lead ), -strlen( $trail ) ); 557 557 } 558 558 559 559 // Parse attribute name and value from input. 560 560 $split = preg_split( '/\s*=\s*/', $string, 2 ); … … 593 593 $vless = 'y'; 594 594 } 595 595 596 596 // Sanitize attribute by name. 597 597 wp_kses_attr_check( $name, $value, $string, $vless, $element, $allowed_html ); … … 1148 1148 $xhtml_slash = ''; 1149 1149 } 1150 1150 1151 1151 // Split it 1152 1152 $attrarr = wp_kses_hair_parse( $attr ); … … 1158 1158 array_unshift( $attrarr, $begin . $slash . $elname ); 1159 1159 array_push( $attrarr, $xhtml_slash . $end ); 1160 1160 1161 1161 return $attrarr; 1162 1162 } … … 1473 1473 $string = str_replace('&', '&', $string); 1474 1474 1475 // Change back the allowed entities in our entity whitelist 1476 $string = preg_replace_callback('/&([A-Za-z]{2,8}[0-9]{0,2});/', 'wp_kses_named_entities', $string); 1477 $string = preg_replace_callback('/&#(0*[0-9]{1,7});/', 'wp_kses_normalize_entities2', $string); 1478 $string = preg_replace_callback('/&#[Xx](0*[0-9A-Fa-f]{1,6});/', 'wp_kses_normalize_entities3', $string); 1475 $string = preg_replace_callback( '/&([A-Za-z]{2,8}[0-9]{0,2});/', 'wp_kses_named_entities', $string ); 1476 $string = preg_replace_callback( '/&#(0*+[1-9][0-9]{0,6});/', 'wp_kses_normalize_entities2', $string ); 1477 $string = preg_replace_callback( '/&#[Xx](0*+[1-9A-Fa-f][0-9A-Fa-f]{0,5});/', 'wp_kses_normalize_entities3', $string ); 1479 1478 1480 1479 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)