Changeset 57316
- Timestamp:
- 01/19/2024 09:40:01 PM (6 months ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/html-api/class-wp-html-processor.php
r57314 r57316 103 103 * - Custom elements: All custom elements are supported. :) 104 104 * - Form elements: BUTTON, DATALIST, FIELDSET, LABEL, LEGEND, METER, PROGRESS, SEARCH. 105 * - Formatting elements: B, BIG, CODE, EM, FONT, I, SMALL, STRIKE, STRONG, TT, U .105 * - Formatting elements: B, BIG, CODE, EM, FONT, I, SMALL, STRIKE, STRONG, TT, U. 106 106 * - Heading elements: H1, H2, H3, H4, H5, H6, HGROUP. 107 107 * - Links: A. 108 108 * - Lists: DD, DL, DT, LI, OL, LI. 109 * - Media elements: AUDIO, CANVAS, FIGCAPTION, FIGURE, IMG, MAP, PICTURE, VIDEO.110 * - Paragraph: P.111 * - Phrasing elements: A BBR, BDI, BDO, CITE, DATA, DEL, DFN, INS, MARK, OUTPUT, Q, SAMP, SUB, SUP, TIME, VAR.109 * - Media elements: AUDIO, CANVAS, FIGCAPTION, FIGURE, IMG, MAP, PICTURE, VIDEO. 110 * - Paragraph: P. 111 * - Phrasing elements: ABBR, BDI, BDO, CITE, DATA, DEL, DFN, INS, MARK, OUTPUT, Q, SAMP, SUB, SUP, TIME, VAR. 112 112 * - Sectioning elements: ARTICLE, ASIDE, HR, NAV, SECTION. 113 113 * - Templating elements: SLOT. 114 114 * - Text decoration: RUBY. 115 * - Deprecated elements: ACRONYM, BLINK, CENTER, DIR, ISINDEX, MULTICOL, NEXTID, SPACER.115 * - Deprecated elements: ACRONYM, BLINK, CENTER, DIR, ISINDEX, MULTICOL, NEXTID, SPACER. 116 116 * 117 117 * ### Supported markup … … 936 936 937 937 /* 938 939 940 941 942 943 944 945 946 947 938 948 * > A start tag whose tag name is one of: "area", "br", "embed", "img", "keygen", "wbr" 939 949 */ 950 951 952 940 953 case '+IMG': 954 955 941 956 $this->reconstruct_active_formatting_elements(); 942 957 $this->insert_html_element( $this->state->current_token ); 958 943 959 return true; 944 960 … … 978 994 case 'BGSOUND': 979 995 case 'BODY': 980 case 'BR':981 996 case 'CAPTION': 982 997 case 'COL': … … 984 999 case 'DD': 985 1000 case 'DT': 986 case 'EMBED':987 1001 case 'FORM': 988 1002 case 'FRAME': … … 992 1006 case 'IFRAME': 993 1007 case 'INPUT': 994 case 'KEYGEN':995 1008 case 'LI': 996 1009 case 'LINK': … … 1032 1045 case 'TRACK': 1033 1046 case 'UL': 1034 case 'WBR':1035 1047 case 'XMP': 1036 1048 $this->last_error = self::ERROR_UNSUPPORTED; … … 1693 1705 'INPUT' === $tag_name || 1694 1706 'LINK' === $tag_name || 1707 1695 1708 'META' === $tag_name || 1696 1709 'SOURCE' === $tag_name || -
trunk/tests/phpunit/tests/html-api/wpHtmlProcessor.php
r57314 r57316 134 134 135 135 /** 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 136 216 * Ensures that special handling of unsupported tags is cleaned up 137 217 * as handling is implemented. Otherwise there's risk of leaving special … … 160 240 return array( 161 241 'APPLET' => array( 'APPLET' ), 162 'AREA' => array( 'AREA' ),163 242 'BASE' => array( 'BASE' ), 164 243 'BASEFONT' => array( 'BASEFONT' ), 165 244 'BGSOUND' => array( 'BGSOUND' ), 166 245 'BODY' => array( 'BODY' ), 167 'BR' => array( 'BR' ),168 246 'CAPTION' => array( 'CAPTION' ), 169 247 'COL' => array( 'COL' ), 170 248 'COLGROUP' => array( 'COLGROUP' ), 171 'EMBED' => array( 'EMBED' ),172 249 'FORM' => array( 'FORM' ), 173 250 'FRAME' => array( 'FRAME' ), … … 177 254 'IFRAME' => array( 'IFRAME' ), 178 255 'INPUT' => array( 'INPUT' ), 179 'KEYGEN' => array( 'KEYGEN' ),180 256 'LINK' => array( 'LINK' ), 181 257 'LISTING' => array( 'LISTING' ), … … 214 290 'TR' => array( 'TR' ), 215 291 'TRACK' => array( 'TRACK' ), 216 'WBR' => array( 'WBR' ),217 292 'XMP' => array( 'XMP' ), 218 293 ); -
trunk/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php
r57314 r57316 163 163 $unsupported_elements = array( 164 164 'APPLET', // Deprecated. 165 'AREA',166 165 'BASE', 167 166 'BGSOUND', // Deprecated; self-closing if self-closing flag provided, otherwise normal. 168 167 'BODY', 169 'BR',170 168 'CAPTION', 171 169 'COL', 172 170 'COLGROUP', 173 'EMBED',174 171 'FORM', 175 172 'FRAME', … … 179 176 'IFRAME', 180 177 'INPUT', 181 'KEYGEN', // Deprecated; void.182 178 'LINK', 183 179 'LISTING', // Deprecated, use PRE instead. … … 214 210 'TR', 215 211 'TRACK', 216 'WBR',217 212 'XMP', // Deprecated, use PRE instead. 218 213 ); -
trunk/tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRules.php
r57314 r57316 393 393 $this->assertSame( array( 'HTML', 'BODY', 'DIV', 'DIV' ), $p->get_breadcrumbs(), 'Failed to produce expected DOM nesting: SPAN should be closed and DIV should be its sibling.' ); 394 394 } 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 395 420 }
Note: See TracChangeset
for help on using the changeset viewer.