- Timestamp:
- 08/23/2024 02:53:59 PM (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/html-api/class-wp-html-processor.php
r58898 r58925 1077 1077 */ 1078 1078 case 'html': 1079 $contents = $this->get_modifiable_text(); 1080 if ( ' html' !== $contents ) { 1081 /* 1082 * @todo When the HTML Tag Processor fully parses the DOCTYPE declaration, 1083 * this code should examine the contents to set the compatability mode. 1084 */ 1085 $this->bail( 'Cannot process any DOCTYPE other than a normative HTML5 doctype.' ); 1079 $doctype = $this->get_doctype_info(); 1080 if ( null !== $doctype && 'quirks' === $doctype->indicated_compatability_mode ) { 1081 $this->state->document_mode = WP_HTML_Processor_State::QUIRKS_MODE; 1086 1082 } 1087 1083 … … 1090 1086 */ 1091 1087 $this->state->insertion_mode = WP_HTML_Processor_State::INSERTION_MODE_BEFORE_HTML; 1088 $this->insert_html_element( $this->state->current_token ); 1092 1089 return true; 1093 1090 } … … 1097 1094 */ 1098 1095 initial_anything_else: 1096 $this->state->document_mode = WP_HTML_Processor_State::QUIRKS_MODE; 1099 1097 $this->state->insertion_mode = WP_HTML_Processor_State::INSERTION_MODE_BEFORE_HTML; 1100 1098 return $this->step( self::REPROCESS_CURRENT_NODE );
Note: See TracChangeset
for help on using the changeset viewer.