- Timestamp:
- 11/13/2024 04:13:52 PM (3 months ago)
- Location:
- branches/6.7
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.7
-
branches/6.7/src/wp-includes/html-api/class-wp-html-processor.php
r59248 r59401 1158 1158 1159 1159 switch ( $token_type ) { 1160 case '#doctype': 1161 $doctype = $this->get_doctype_info(); 1162 if ( null === $doctype ) { 1163 break; 1164 } 1165 1166 $html .= '<!DOCTYPE'; 1167 1168 if ( $doctype->name ) { 1169 $html .= " {$doctype->name}"; 1170 } 1171 1172 if ( null !== $doctype->public_identifier ) { 1173 $html .= " PUBLIC \"{$doctype->public_identifier}\""; 1174 } 1175 if ( null !== $doctype->system_identifier ) { 1176 if ( null === $doctype->public_identifier ) { 1177 $html .= ' SYSTEM'; 1178 } 1179 $html .= " \"{$doctype->system_identifier}\""; 1180 } 1181 $html .= '>'; 1182 break; 1183 1160 1184 case '#text': 1161 1185 $html .= htmlspecialchars( $this->get_modifiable_text(), ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML5, 'UTF-8' ); … … 1173 1197 case '#cdata-section': 1174 1198 $html .= "<![CDATA[{$this->get_modifiable_text()}]]>"; 1175 break;1176 1177 case 'html':1178 $html .= '<!DOCTYPE html>';1179 1199 break; 1180 1200 }
Note: See TracChangeset
for help on using the changeset viewer.