- Timestamp:
- 12/13/2023 05:51:42 PM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/html-api/class-wp-html-processor.php
r57115 r57186 103 103 * - Form elements: BUTTON, FIELDSET, SEARCH. 104 104 * - Formatting elements: B, BIG, CODE, EM, FONT, I, SMALL, STRIKE, STRONG, TT, U. 105 * - Heading elements: H GROUP.105 * - Heading elements: H1, H2, H3, H4, H5, H6, HGROUP. 106 106 * - Links: A. 107 107 * - Lists: DL. … … 696 696 } 697 697 $this->state->stack_of_open_elements->pop_until( $tag_name ); 698 return true; 699 700 /* 701 * > A start tag whose tag name is one of: "h1", "h2", "h3", "h4", "h5", "h6" 702 */ 703 case '+H1': 704 case '+H2': 705 case '+H3': 706 case '+H4': 707 case '+H5': 708 case '+H6': 709 if ( $this->state->stack_of_open_elements->has_p_in_button_scope() ) { 710 $this->close_a_p_element(); 711 } 712 713 if ( 714 in_array( 715 $this->state->stack_of_open_elements->current_node()->node_name, 716 array( 'H1', 'H2', 'H3', 'H4', 'H5', 'H6' ), 717 true 718 ) 719 ) { 720 // @TODO: Indicate a parse error once it's possible. 721 $this->state->stack_of_open_elements->pop(); 722 } 723 724 $this->insert_html_element( $this->state->current_token ); 725 return true; 726 727 /* 728 * > An end tag whose tag name is one of: "h1", "h2", "h3", "h4", "h5", "h6" 729 */ 730 case '-H1': 731 case '-H2': 732 case '-H3': 733 case '-H4': 734 case '-H5': 735 case '-H6': 736 if ( ! $this->state->stack_of_open_elements->has_element_in_scope( '(internal: H1 through H6 - do not use)' ) ) { 737 /* 738 * This is a parse error; ignore the token. 739 * 740 * @TODO: Indicate a parse error once it's possible. 741 */ 742 return $this->step(); 743 } 744 745 $this->generate_implied_end_tags(); 746 747 if ( $this->state->stack_of_open_elements->current_node()->node_name !== $tag_name ) { 748 // @TODO: Record parse error: this error doesn't impact parsing. 749 } 750 751 $this->state->stack_of_open_elements->pop_until( '(internal: H1 through H6 - do not use)' ); 698 752 return true; 699 753
Note: See TracChangeset
for help on using the changeset viewer.