Changeset 61499
- Timestamp:
- 01/19/2026 08:44:38 PM (3 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
src/wp-includes/kses.php (modified) (2 diffs)
-
tests/phpunit/tests/kses/wpKsesHair.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/kses.php
r61486 r61499 1624 1624 $processor->next_token(); 1625 1625 1626 $attribute_names = $processor->get_attribute_names_with_prefix( '' ); 1627 if ( ! isset( $attribute_names ) ) { 1628 return $attributes; 1629 } 1630 1626 1631 $syntax_characters = array( 1627 1632 '&' => '&', … … 1632 1637 ); 1633 1638 1634 foreach ( $ processor->get_attribute_names_with_prefix( '' )as $name ) {1639 foreach ( $attribute_names as $name ) { 1635 1640 $value = $processor->get_attribute( $name ); 1636 1641 $is_bool = true === $value; -
trunk/tests/phpunit/tests/kses/wpKsesHair.php
r61467 r61499 40 40 */ 41 41 public function data_attribute_parsing() { 42 yield 'empty attributes' => array( 43 '', 44 array(), 45 ); 46 47 yield 'prematurely-terminated attributes' => array( 48 '>', 49 array(), 50 ); 51 52 yield 'prematurely-terminated malformed attributes' => array( 53 'foo>bar="baz"', 54 array( 55 'foo' => array( 56 'name' => 'foo', 57 'value' => '', 58 'whole' => 'foo', 59 'vless' => 'y', 60 ), 61 ), 62 ); 63 42 64 yield 'single attribute with double quotes' => array( 43 65 'class="test-class"',
Note: See TracChangeset
for help on using the changeset viewer.