Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
aaee111
Apply patch from <select> parser PR
sirreal Jul 22, 2025
9ab745d
Update reset_insertion_mode_appropriately
sirreal Jul 22, 2025
1acfce7
Deprecate the has_element_in_select_scope method
sirreal Jul 22, 2025
aac853d
Update "normal" end tag handling to include SELECT
sirreal Jul 22, 2025
89c113d
Update INPUT handling to account for SELECT
sirreal Jul 22, 2025
f75a08f
Update HR tag handling
sirreal Jul 22, 2025
099f013
Update SELECT insertion handling
sirreal Jul 22, 2025
7fe3598
Update OPTION, OPTGROUP insertion handling
sirreal Jul 22, 2025
20e0807
Remove in_select and in_select_in_table step methods
sirreal Jul 22, 2025
45edeae
Deprecate unused insertion mode constants
sirreal Jul 22, 2025
446cdaa
Adjust html5lib-test expectation
sirreal Jul 22, 2025
0ed0a68
Add close option tag comments, do not handle cloning
sirreal Jul 22, 2025
8beb128
Update has_element_in_scope with SELECT
sirreal Jul 22, 2025
6be6287
Bail when parsing SELECTEDCONTENT requiring clone
sirreal Jul 22, 2025
9e79bb2
Update html5lib-tests
sirreal Jul 22, 2025
e53ed75
Merge branch 'trunk' into html-api/update-select-tag-parsing
sirreal Jun 9, 2026
95c0559
Update html5lib-tests from 9fb614afaa42ce8787840f057b32084308e76549
sirreal Jun 9, 2026
171c24f
HTML API: Set select deprecation versions to 7.1.0.
sirreal Jun 9, 2026
120619b
HTML API: Empty the deprecated select scope check.
sirreal Jun 9, 2026
8f0bf91
HTML API: Use isset() for context node checks in select handling.
sirreal Jun 9, 2026
e9826a6
HTML API: Remove redundant OPTION end tag comment.
sirreal Jun 9, 2026
e30d007
HTML API: Document customizable select support in class docs.
sirreal Jun 9, 2026
c863814
HTML API: Treat SELECT as a button and list item scope boundary.
sirreal Jun 9, 2026
2f078d0
Merge branch 'trunk' into html-api/update-select-tag-parsing
sirreal Jun 10, 2026
a2d0670
HTML API: Ignore deprecated select parsing internals
sirreal Jun 10, 2026
805cf1f
Merge branch 'trunk' into html-api/update-select-tag-parsing
sirreal Jun 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 12 additions & 17 deletions src/wp-includes/html-api/class-wp-html-open-elements.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ public function has_element_in_specific_scope( string $tag_name, $termination_li
* > - th
* > - marquee
* > - object
* > - select
* > - template
* > - MathML mi
* > - MathML mo
Expand Down Expand Up @@ -312,6 +313,7 @@ public function has_element_in_scope( string $tag_name ): bool {
'TH',
'MARQUEE',
'OBJECT',
'SELECT',
'TEMPLATE',

'math MI',
Expand Down Expand Up @@ -362,6 +364,7 @@ public function has_element_in_list_item_scope( string $tag_name ): bool {
'MARQUEE',
'OBJECT',
'OL',
'SELECT',
'TEMPLATE',
'UL',

Expand Down Expand Up @@ -410,6 +413,7 @@ public function has_element_in_button_scope( string $tag_name ): bool {
'TH',
'MARQUEE',
'OBJECT',
'SELECT',
'TEMPLATE',

'math MI',
Expand Down Expand Up @@ -459,9 +463,8 @@ public function has_element_in_table_scope( string $tag_name ): bool {
/**
* Returns whether a particular element is in select scope.
*
* This test differs from the others like it, in that its rules are inverted.
* Instead of arriving at a match when one of any tag in a termination group
* is reached, this one terminates if any other tag is reached.
* The "select scope" concept was removed from the HTML standard along with the
* customizable `<select>` changes, so nothing is ever in select scope.
*
* > The stack of open elements is said to have a particular element in select scope when it has
* > that element in the specific scope consisting of all element types except the following:
Expand All @@ -471,24 +474,14 @@ public function has_element_in_table_scope( string $tag_name ): bool {
* @since 6.4.0 Stub implementation (throws).
* @since 6.7.0 Full implementation.
*
* @see https://html.spec.whatwg.org/#has-an-element-in-select-scope
* @deprecated 7.1.0 This method is no longer part of the HTML standard.
* @ignore
*
* @param string $tag_name Name of tag to check.
* @return bool Whether the given element is in SELECT scope.
* @return bool Always false; select scope no longer exists.
*/
public function has_element_in_select_scope( string $tag_name ): bool {
foreach ( $this->walk_up() as $node ) {
if ( $node->node_name === $tag_name ) {
return true;
}

if (
'OPTION' !== $node->node_name &&
'OPTGROUP' !== $node->node_name
) {
return false;
}
}
_deprecated_function( __METHOD__, '7.1.0' );

return false;
}
Expand Down Expand Up @@ -697,6 +690,7 @@ public function after_element_push( WP_HTML_Token $item ): void {
case 'TH':
case 'MARQUEE':
case 'OBJECT':
case 'SELECT':
case 'TEMPLATE':
case 'math MI':
case 'math MO':
Expand Down Expand Up @@ -753,6 +747,7 @@ public function after_element_pop( WP_HTML_Token $item ): void {
case 'TH':
case 'MARQUEE':
case 'OBJECT':
case 'SELECT':
case 'TEMPLATE':
case 'math MI':
case 'math MO':
Expand Down
8 changes: 6 additions & 2 deletions src/wp-includes/html-api/class-wp-html-processor-state.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,9 @@ class WP_HTML_Processor_State {
*
* @since 6.7.0
*
* @see https://html.spec.whatwg.org/#parsing-main-inselect
* @deprecated 7.1.0 The "in select" insertion mode was removed from the standard.
* @ignore
*
* @see WP_HTML_Processor_State::$insertion_mode
*
* @var string
Expand All @@ -221,7 +223,9 @@ class WP_HTML_Processor_State {
*
* @since 6.7.0
*
* @see https://html.spec.whatwg.org/#parsing-main-inselectintable
* @deprecated 7.1.0 The "in select in table" insertion mode was removed from the standard.
* @ignore
*
* @see WP_HTML_Processor_State::$insertion_mode
*
* @var string
Expand Down
Loading
Loading