Changeset 65876
- Timestamp:
- 12/03/2026 05:56:55 AM (14 hours ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/kses/wpKsesSpecialAtomicElements.php
r65866 r65876 132 132 $sanitized_body = DOM\HtmlDocument::createFromString( "<!DOCTYPE html><body>{$sanitized_element}", LIBXML_NOERROR )->body; 133 133 134 $expected_content = $expected_body->firstChild->textContent; 135 switch ( $tag_name ) { 136 case 'iframe': 137 $expected_content = ''; 138 break; 139 140 case 'noembed': 141 case 'noframes': 142 case 'xmp': 143 $expected_content = strtr( 144 $expected_content, 145 array( 146 '<' => '⟨', 147 '>' => '⟩', 148 ) 149 ); 150 break; 151 } 152 134 153 $this->assertSame( 135 array( $expected_body->childNodes->length, $expected_ body->firstChild->textContent ),154 array( $expected_body->childNodes->length, $expected_content ), 136 155 array( $sanitized_body->childNodes->length, $sanitized_body->firstChild->textContent ), 137 156 'Should have preserved the special atomic element and its text content when appearing by itself inside a BODY: check test setup.'
Note:
See TracChangeset
for help on using the changeset viewer.