- Timestamp:
- 08/06/2020 01:26:06 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/kses.php
r48572 r48744 17 17 'class' => 'classname', 18 18 'id' => 'id', 19 'style' => 'color: red;', 20 'style' => 'color: red', 21 'style' => 'color: red; text-align:center', 22 'style' => 'color: red; text-align:center;', 19 'style' => array( 20 'color: red;', 21 'color: red', 22 'color: red; text-align:center', 23 'color: red; text-align:center;', 24 ), 23 25 'title' => 'title', 24 26 ); 25 27 26 foreach ( $attributes as $name => $value ) { 27 $string = "<address $name='$value'>1 WordPress Avenue, The Internet.</address>"; 28 $expect_string = "<address $name='" . str_replace( '; ', ';', trim( $value, ';' ) ) . "'>1 WordPress Avenue, The Internet.</address>"; 29 $this->assertEquals( $expect_string, wp_kses( $string, $allowedposttags ) ); 28 foreach ( $attributes as $name => $values ) { 29 foreach ( (array) $values as $value ) { 30 $string = "<address $name='$value'>1 WordPress Avenue, The Internet.</address>"; 31 $expect_string = "<address $name='" . str_replace( '; ', ';', trim( $value, ';' ) ) . "'>1 WordPress Avenue, The Internet.</address>"; 32 $this->assertEquals( $expect_string, wp_kses( $string, $allowedposttags ) ); 33 } 30 34 } 31 35 }
Note: See TracChangeset
for help on using the changeset viewer.