Changeset 57314
- Timestamp:
- 01/19/2024 07:01:29 PM (9 months ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/html-api/class-wp-html-processor.php
r57264 r57314 110 110 * - Paragraph: P. 111 111 * - Phrasing elements: ABBR, BDI, BDO, CITE, DATA, DEL, DFN, INS, MARK, OUTPUT, Q, SAMP, SUB, SUP, TIME, VAR. 112 * - Sectioning elements: ARTICLE, ASIDE, NAV, SECTION.112 * - Sectioning elements: ARTICLE, ASIDE, HR, NAV, SECTION. 113 113 * - Templating elements: SLOT. 114 114 * - Text decoration: RUBY. … … 941 941 $this->reconstruct_active_formatting_elements(); 942 942 $this->insert_html_element( $this->state->current_token ); 943 return true; 944 945 /* 946 * > A start tag whose tag name is "hr" 947 */ 948 case '+HR': 949 if ( $this->state->stack_of_open_elements->has_p_in_button_scope() ) { 950 $this->close_a_p_element(); 951 } 952 $this->insert_html_element( $this->state->current_token ); 953 $this->state->frameset_ok = false; 943 954 return true; 944 955 } … … 978 989 case 'FRAMESET': 979 990 case 'HEAD': 980 case 'HR':981 991 case 'HTML': 982 992 case 'IFRAME': -
trunk/tests/phpunit/tests/html-api/wpHtmlProcessor.php
r57264 r57314 174 174 'FRAMESET' => array( 'FRAMESET' ), 175 175 'HEAD' => array( 'HEAD' ), 176 'HR' => array( 'HR' ),177 176 'HTML' => array( 'HTML' ), 178 177 'IFRAME' => array( 'IFRAME' ), -
trunk/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php
r57264 r57314 176 176 'FRAMESET', 177 177 'HEAD', 178 'HR',179 178 'HTML', 180 179 'IFRAME', -
trunk/tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRules.php
r57264 r57314 226 226 227 227 /** 228 * Verifies that HR closes an open p tag 229 * 230 * @ticket 60283 231 */ 232 public function test_in_body_hr_element_closes_open_p_tag() { 233 $processor = WP_HTML_Processor::create_fragment( '<p><hr>' ); 234 235 $processor->next_tag( 'HR' ); 236 $this->assertSame( 237 array( 'HTML', 'BODY', 'HR' ), 238 $processor->get_breadcrumbs(), 239 'Expected HR to be a direct child of the BODY, having closed the open P element.' 240 ); 241 } 242 243 /** 228 244 * Verifies that H1 through H6 elements close an open P element. 229 245 *
Note: See TracChangeset
for help on using the changeset viewer.