- Timestamp:
- 04/24/2024 07:43:02 AM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/html-api/class-wp-html-tag-processor.php
r57987 r58040 1630 1630 * https://html.spec.whatwg.org/multipage/parsing.html#markup-declaration-open-state 1631 1631 */ 1632 if ( '!' === $html[ $at + 1 ] ) {1632 if ( ! $this->is_closing_tag && '!' === $html[ $at + 1 ] ) { 1633 1633 /* 1634 1634 * `<!--` transitions to a comment state – apply further comment rules. … … 1810 1810 */ 1811 1811 if ( '>' === $html[ $at + 1 ] ) { 1812 // `<>` is interpreted as plaintext. 1813 if ( ! $this->is_closing_tag ) { 1814 ++$at; 1815 continue; 1816 } 1817 1812 1818 $this->parser_state = self::STATE_PRESUMPTUOUS_TAG; 1813 1819 $this->token_length = $at + 2 - $this->token_starts_at; … … 1820 1826 * See https://html.spec.whatwg.org/multipage/parsing.html#tag-open-state 1821 1827 */ 1822 if ( '?' === $html[ $at + 1 ] ) {1828 if ( ! $this->is_closing_tag && '?' === $html[ $at + 1 ] ) { 1823 1829 $closer_at = strpos( $html, '>', $at + 2 ); 1824 1830 if ( false === $closer_at ) { … … 1892 1898 } 1893 1899 1894 $closer_at = strpos( $html, '>', $at + 3);1900 $closer_at = strpos( $html, '>', $at + 2 ); 1895 1901 if ( false === $closer_at ) { 1896 1902 $this->parser_state = self::STATE_INCOMPLETE_INPUT;
Note: See TracChangeset
for help on using the changeset viewer.