- Timestamp:
- 07/31/2024 04:54:23 PM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php
r58833 r58836 26 26 $processor = WP_HTML_Processor::create_fragment( $html ); 27 27 28 $this->assertTrue( $processor-> step(), "Failed to step into supported {$tag_name} element." );28 $this->assertTrue( $processor->next_token(), "Failed to step into supported {$tag_name} element." ); 29 29 $this->assertSame( $tag_name, $processor->get_tag(), "Misread {$tag_name} as a {$processor->get_tag()} element." ); 30 30 } … … 91 91 'INS', 92 92 'LI', 93 'LINK', 93 94 'ISINDEX', // Deprecated. 94 95 'KBD', … … 109 110 'NEXTID', // Deprecated. 110 111 'NOBR', // Neutralized. 112 'NOEMBED', // Neutralized. 113 'NOFRAMES', // Neutralized. 111 114 'NOSCRIPT', 112 115 'OBJECT', … … 123 126 'RUBY', 124 127 'SAMP', 128 'SCRIPT', 125 129 'SEARCH', 126 130 'SECTION', … … 131 135 'STRIKE', 132 136 'STRONG', 137 'STYLE', 133 138 'SUB', 134 139 'SUMMARY', 135 140 'SUP', 136 141 'TABLE', 142 'TEXTAREA', 137 143 'TIME', 144 'TITLE', 138 145 'TT', 139 146 'U', … … 141 148 'VAR', 142 149 'VIDEO', 150 'XMP', // Deprecated, use PRE instead. 143 151 ); 144 152 145 153 $data = array(); 146 154 foreach ( $supported_elements as $tag_name ) { 147 $data[ $tag_name ] = array( "<{$tag_name}>", $tag_name ); 155 $closer = in_array( $tag_name, array( 'NOEMBED', 'NOFRAMES', 'SCRIPT', 'STYLE', 'TEXTAREA', 'TITLE', 'XMP' ), true ) 156 ? "</{$tag_name}>" 157 : ''; 158 159 $data[ $tag_name ] = array( "<{$tag_name}>{$closer}", $tag_name ); 148 160 } 149 161 … … 183 195 public static function data_unsupported_elements() { 184 196 $unsupported_elements = array( 185 'BODY',186 'FRAME',187 'FRAMESET',188 'HEAD',189 'HTML',190 'IFRAME',191 197 'MATH', 192 'NOEMBED', // Neutralized.193 'NOFRAMES', // Neutralized.194 198 'PLAINTEXT', // Neutralized. 195 'SCRIPT',196 'STYLE',197 199 'SVG', 198 'TEXTAREA',199 'TITLE',200 'XMP', // Deprecated, use PRE instead.201 200 ); 202 201
Note: See TracChangeset
for help on using the changeset viewer.