From e2ca83d7078fcc2fbda757d25c9306c05e316daa Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 12:54:03 +0200 Subject: [PATCH 01/34] HTML API: Fix grammar in WP_HTML_Active_Formatting_Elements::count() docblock. Corrects "How many node are" to "How many nodes are" in the @return description. --- .../html-api/class-wp-html-active-formatting-elements.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/html-api/class-wp-html-active-formatting-elements.php b/src/wp-includes/html-api/class-wp-html-active-formatting-elements.php index 90c3bbbd34e3b..d73561843bcb2 100644 --- a/src/wp-includes/html-api/class-wp-html-active-formatting-elements.php +++ b/src/wp-includes/html-api/class-wp-html-active-formatting-elements.php @@ -67,7 +67,7 @@ public function contains_node( WP_HTML_Token $token ) { * * @since 6.4.0 * - * @return int How many node are in the stack of active formatting elements. + * @return int How many nodes are in the stack of active formatting elements. */ public function count() { return count( $this->stack ); From 10fa6c96af9b6a0d5af75c073a8388ec32f591c7 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 12:54:10 +0200 Subject: [PATCH 02/34] HTML API: Fix grammar in WP_HTML_Open_Elements::count() docblock. Corrects "How many node are" to "How many nodes are" in the @return description. --- src/wp-includes/html-api/class-wp-html-open-elements.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/html-api/class-wp-html-open-elements.php b/src/wp-includes/html-api/class-wp-html-open-elements.php index 0cd1f0fc45e07..667bb9141a84f 100644 --- a/src/wp-includes/html-api/class-wp-html-open-elements.php +++ b/src/wp-includes/html-api/class-wp-html-open-elements.php @@ -168,7 +168,7 @@ public function contains_node( WP_HTML_Token $token ): bool { * * @since 6.4.0 * - * @return int How many node are in the stack of open elements. + * @return int How many nodes are in the stack of open elements. */ public function count(): int { return count( $this->stack ); From cedb241c0054a194362362bc3c80196a65b8ed89 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 12:54:21 +0200 Subject: [PATCH 03/34] HTML API: Add missing comma in WP_HTML_Processor class docblock. Adds a comma after "erroneously match" so the introductory clause is properly separated from the following independent clause. --- src/wp-includes/html-api/class-wp-html-processor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/html-api/class-wp-html-processor.php b/src/wp-includes/html-api/class-wp-html-processor.php index 35d91fad3129c..2c9cbbe95a67c 100644 --- a/src/wp-includes/html-api/class-wp-html-processor.php +++ b/src/wp-includes/html-api/class-wp-html-processor.php @@ -66,7 +66,7 @@ * tags may be found with the shortest-matching breadcrumb query. That is, * `array( 'IMG' )` matches all IMG elements and `array( 'P', 'IMG' )` * matches all IMG elements directly inside a P element. To ensure that no - * partial matches erroneously match it's possible to specify in a query + * partial matches erroneously match, it's possible to specify in a query * the full breadcrumb match all the way down from the root HTML element. * * Example: From 40af08376fe4016b1999e523e231ec5a82889ada Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 12:54:30 +0200 Subject: [PATCH 04/34] HTML API: Add missing comma in WP_HTML_Processor::get_last_error() docblock. Adds a comma after "failed" to separate the introductory clause from the following independent clause. --- src/wp-includes/html-api/class-wp-html-processor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/html-api/class-wp-html-processor.php b/src/wp-includes/html-api/class-wp-html-processor.php index 2c9cbbe95a67c..4ffb7b3982135 100644 --- a/src/wp-includes/html-api/class-wp-html-processor.php +++ b/src/wp-includes/html-api/class-wp-html-processor.php @@ -621,7 +621,7 @@ private function bail( string $message ) { * * Various situations lead to parsing failure but this class will * return `false` in all those cases. To determine why something - * failed it's possible to request the last error. This can be + * failed, it's possible to request the last error. This can be * helpful to know to distinguish whether a given tag couldn't * be found or if content in the document caused the processor * to give up and abort processing. From ef2f483fa787f2d0a2336ca6b8dc612421d728ff Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 12:54:42 +0200 Subject: [PATCH 05/34] HTML API: Fix punctuation in WP_HTML_Processor::expects_closer() docblock. Adds the missing closing comma around the "like an IMG element" parenthetical phrase. --- src/wp-includes/html-api/class-wp-html-processor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/html-api/class-wp-html-processor.php b/src/wp-includes/html-api/class-wp-html-processor.php index 4ffb7b3982135..1186a75f1b307 100644 --- a/src/wp-includes/html-api/class-wp-html-processor.php +++ b/src/wp-includes/html-api/class-wp-html-processor.php @@ -957,7 +957,7 @@ public function matches_breadcrumbs( $breadcrumbs ): bool { * token, or if it will self-close on the next step. * * Most HTML elements expect a closer, such as a P element or - * a DIV element. Others, like an IMG element are void and don't + * a DIV element. Others, like an IMG element, are void and don't * have a closing tag. Special elements, such as SCRIPT and STYLE, * are treated just like void tags. Text nodes and self-closing * foreign content will also act just like a void tag, immediately From 4db0be79cde4d15a90fb3dacdaf65ca4b8858376 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 12:54:53 +0200 Subject: [PATCH 06/34] HTML API: Fix punctuation in serialize_token() docblock. Adds commas to separate the conditions in the compound conditional describing when an empty string is returned. --- src/wp-includes/html-api/class-wp-html-processor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/html-api/class-wp-html-processor.php b/src/wp-includes/html-api/class-wp-html-processor.php index 1186a75f1b307..1c6edd998327c 100644 --- a/src/wp-includes/html-api/class-wp-html-processor.php +++ b/src/wp-includes/html-api/class-wp-html-processor.php @@ -1340,7 +1340,7 @@ public function serialize(): ?string { * Serializes the currently-matched token. * * This method produces a fully-normative HTML string for the currently-matched token, - * if able. If not matched at any token or if the token doesn't correspond to any HTML + * if able. If not matched at any token, or if the token doesn't correspond to any HTML, * it will return an empty string (for example, presumptuous end tags are ignored). * * @see static::serialize() From e292a9322a6f6ce25b23d4927455f17bbb19c469 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 12:55:06 +0200 Subject: [PATCH 07/34] HTML API: Fix capitalization of "HTML" in WP_HTML_Tag_Processor docblock. Corrects "HTMl" to "HTML" in the Bookmarks section. --- src/wp-includes/html-api/class-wp-html-tag-processor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/html-api/class-wp-html-tag-processor.php b/src/wp-includes/html-api/class-wp-html-tag-processor.php index 77c1a471db5b1..4e5f41c5227c1 100644 --- a/src/wp-includes/html-api/class-wp-html-tag-processor.php +++ b/src/wp-includes/html-api/class-wp-html-tag-processor.php @@ -213,7 +213,7 @@ * * ### Bookmarks * - * While scanning through the input HTMl document it's possible to set + * While scanning through the input HTML document it's possible to set * a named bookmark when a particular tag is found. Later on, after * continuing to scan other tags, it's possible to `seek` to one of * the set bookmarks and then proceed again from that point forward. From 91414a687c08eea85a7ce70125907106ade3058f Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 12:55:13 +0200 Subject: [PATCH 08/34] HTML API: Remove extra word in WP_HTML_Tag_Processor docblock. Removes the stray "the" in "This means that the it's not possible". --- src/wp-includes/html-api/class-wp-html-tag-processor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/html-api/class-wp-html-tag-processor.php b/src/wp-includes/html-api/class-wp-html-tag-processor.php index 4e5f41c5227c1..0359a3fad213a 100644 --- a/src/wp-includes/html-api/class-wp-html-tag-processor.php +++ b/src/wp-includes/html-api/class-wp-html-tag-processor.php @@ -286,7 +286,7 @@ * * For these elements the Tag Processor treats the entire sequence as one, * from the opening tag, including its contents, through its closing tag. - * This means that the it's not possible to match the closing tag for a + * This means that it's not possible to match the closing tag for a * SCRIPT element unless it's unexpected; the Tag Processor already matched * it when it found the opening tag. * From 1ce6d3fb2e724dc767ac794137214337813bfa51 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 12:55:21 +0200 Subject: [PATCH 09/34] HTML API: Fix typo "do no exist" in WP_HTML_Tag_Processor docblock. Corrects "do no exist" to "do not exist" in the Processing Instructions section. --- src/wp-includes/html-api/class-wp-html-tag-processor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/html-api/class-wp-html-tag-processor.php b/src/wp-includes/html-api/class-wp-html-tag-processor.php index 0359a3fad213a..970f056f3905f 100644 --- a/src/wp-includes/html-api/class-wp-html-tag-processor.php +++ b/src/wp-includes/html-api/class-wp-html-tag-processor.php @@ -329,7 +329,7 @@ * and disallows "xml" as a name, since it's special. The Tag Processor only recognizes * target names with an ASCII-representable subset of characters. It also exhibits the * same constraint as with CDATA sections, in that `>` cannot exist within the token - * since Processing Instructions do no exist within HTML and their syntax transforms + * since Processing Instructions do not exist within HTML and their syntax transforms * into a bogus comment in the DOM. * * ## Design and limitations From abfbfa00c0ce3907fd971d7544c29bbbd4046729 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 12:55:28 +0200 Subject: [PATCH 10/34] HTML API: Remove duplicate word in QUIRKS_MODE description. Removes the duplicated "match" in the description of CSS selector matching. --- src/wp-includes/html-api/class-wp-html-tag-processor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/html-api/class-wp-html-tag-processor.php b/src/wp-includes/html-api/class-wp-html-tag-processor.php index 970f056f3905f..4a8169a27a05b 100644 --- a/src/wp-includes/html-api/class-wp-html-tag-processor.php +++ b/src/wp-includes/html-api/class-wp-html-tag-processor.php @@ -521,7 +521,7 @@ class WP_HTML_Tag_Processor { * - A TABLE start tag `` implicitly closes any open `P` element. * * - In `QUIRKS_MODE`: - * - CSS class and ID selectors match match in an ASCII case-insensitive manner. + * - CSS class and ID selectors match in an ASCII case-insensitive manner. * - A TABLE start tag `
` opens a `TABLE` element as a child of a `P` * element if one is open. * From 7a14a380997fd12f74a0e7e2b04c3be03c221c13 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 12:55:35 +0200 Subject: [PATCH 11/34] HTML API: Fix typo "closing to tag" in WP_HTML_Tag_Processor. Removes the stray "to" in the special atomic tag handling comment. --- src/wp-includes/html-api/class-wp-html-tag-processor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/html-api/class-wp-html-tag-processor.php b/src/wp-includes/html-api/class-wp-html-tag-processor.php index 4a8169a27a05b..c49ff95269fc7 100644 --- a/src/wp-includes/html-api/class-wp-html-tag-processor.php +++ b/src/wp-includes/html-api/class-wp-html-tag-processor.php @@ -1073,7 +1073,7 @@ private function base_class_next_token(): bool { * * Preserve the opening tag pointers, as these will be overwritten * when finding the closing tag. They will be reset after finding - * the closing to tag to point to the opening of the special atomic + * the closing tag to point to the opening of the special atomic * tag sequence. */ $tag_name_starts_at = $this->tag_name_starts_at; From 50cd2f2d070ac4b61200f0c1e0f0ee0756da56ac Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 12:55:43 +0200 Subject: [PATCH 12/34] HTML API: Fix subject-verb agreement in replacement sorting comment. Corrects "Sorting avoid" to "Sorting avoids" in WP_HTML_Tag_Processor. --- src/wp-includes/html-api/class-wp-html-tag-processor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/html-api/class-wp-html-tag-processor.php b/src/wp-includes/html-api/class-wp-html-tag-processor.php index c49ff95269fc7..9649f9cb8a6b9 100644 --- a/src/wp-includes/html-api/class-wp-html-tag-processor.php +++ b/src/wp-includes/html-api/class-wp-html-tag-processor.php @@ -2525,7 +2525,7 @@ private function apply_attributes_updates( int $shift_this_point ): int { * replacement must be made before all others which follow it * at later string indices in the input document. * - * Sorting avoid making out-of-order replacements which + * Sorting avoids making out-of-order replacements which * can lead to mangled output, partially-duplicated * attributes, and overwritten attributes. */ From 3d93924445965742c60201fe22dc058b8a71d6f0 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 12:55:56 +0200 Subject: [PATCH 13/34] HTML API: Fix verb tense in funky comments docblock. Corrects "are turn into" to "are turned into" in the funky comments description. --- src/wp-includes/html-api/class-wp-html-tag-processor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/html-api/class-wp-html-tag-processor.php b/src/wp-includes/html-api/class-wp-html-tag-processor.php index 9649f9cb8a6b9..3d85c7d755cca 100644 --- a/src/wp-includes/html-api/class-wp-html-tag-processor.php +++ b/src/wp-includes/html-api/class-wp-html-tag-processor.php @@ -4935,7 +4935,7 @@ public function get_doctype_info(): ?WP_HTML_Doctype_Info { * * * Funky comments are tag closers with invalid tag names. Note - * that in HTML these are turn into bogus comments. Nonetheless, + * that in HTML these are turned into bogus comments. Nonetheless, * the Tag Processor recognizes them in a stream of HTML and * exposes them for inspection and modification. * From b1e6c4aee88960be30f04d2af0756915adb2238f Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 12:56:08 +0200 Subject: [PATCH 14/34] Tests: HTML API: Fix typo "case-insentivity" in test_next_tag_lowercase_tag_name(). Corrects two occurrences of "case-insentivity" to "case-insensitivity" in comments. --- tests/phpunit/tests/html-api/wpHtmlProcessor.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/html-api/wpHtmlProcessor.php b/tests/phpunit/tests/html-api/wpHtmlProcessor.php index a89014282df73..bb18629563493 100644 --- a/tests/phpunit/tests/html-api/wpHtmlProcessor.php +++ b/tests/phpunit/tests/html-api/wpHtmlProcessor.php @@ -1071,11 +1071,11 @@ public function test_ensure_next_token_method_extensibility( $html, $expected_to * @ticket 62427 */ public function test_next_tag_lowercase_tag_name() { - // The upper case
is irrelevant but illustrates the case-insentivity. + // The upper case
is irrelevant but illustrates the case-insensitivity. $processor = WP_HTML_Processor::create_fragment( '
' ); $this->assertTrue( $processor->next_tag( array( 'tag_name' => 'div' ) ) ); - // The upper case is irrelevant but illustrates the case-insentivity. + // The upper case is irrelevant but illustrates the case-insensitivity. $processor = WP_HTML_Processor::create_fragment( '' ); $this->assertTrue( $processor->next_tag( array( 'tag_name' => 'rect' ) ) ); } From 98baee0402b3da5d1d4765efba086de05fdeb0b0 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 12:56:20 +0200 Subject: [PATCH 15/34] Tests: HTML API: Fix typo "unpected" in serialize assertion. Corrects "unpected" to "unexpected" in the assertion message of test_unexpected_closing_tags_are_removed(). --- tests/phpunit/tests/html-api/wpHtmlProcessor-serialize.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/tests/html-api/wpHtmlProcessor-serialize.php b/tests/phpunit/tests/html-api/wpHtmlProcessor-serialize.php index e516addb6c314..52a855d40cff4 100644 --- a/tests/phpunit/tests/html-api/wpHtmlProcessor-serialize.php +++ b/tests/phpunit/tests/html-api/wpHtmlProcessor-serialize.php @@ -138,7 +138,7 @@ public function test_unexpected_closing_tags_are_removed() { $this->assertSame( WP_HTML_Processor::normalize( 'one
twothree' ), 'onetwothree', - 'Should have removed unpected closing tags.' + 'Should have removed unexpected closing tags.' ); } From 685c76709485587f7fa86c81996b401f75fa9555 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 12:56:32 +0200 Subject: [PATCH 16/34] Tests: HTML API: Fix typo "Deprectated" in breadcrumbs test. Corrects "Deprectated" to "Deprecated" in the inline comment next to BGSOUND. --- tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php b/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php index 911fa8b910b37..b54fc047ab040 100644 --- a/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php +++ b/tests/phpunit/tests/html-api/wpHtmlProcessorBreadcrumbs.php @@ -49,7 +49,7 @@ public static function data_single_tag_of_supported_elements() { 'BASE', 'BDI', 'BDO', - 'BGSOUND', // Deprectated. + 'BGSOUND', // Deprecated. 'BIG', 'BLINK', // Deprecated. 'BR', From 220bef0dc024502e27ec5df03065f71423bfa015 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 12:56:43 +0200 Subject: [PATCH 17/34] Tests: HTML API: Fix typo "instriction" in comment test data. Corrects two occurrences of "Processing instriction" to "Processing instruction" in the data provider for comment-as-PI tests. --- tests/phpunit/tests/html-api/wpHtmlProcessorComments.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/html-api/wpHtmlProcessorComments.php b/tests/phpunit/tests/html-api/wpHtmlProcessorComments.php index 0cc4fdb0938fa..4ea17f2318b51 100644 --- a/tests/phpunit/tests/html-api/wpHtmlProcessorComments.php +++ b/tests/phpunit/tests/html-api/wpHtmlProcessorComments.php @@ -41,8 +41,8 @@ public static function data_comments() { 'Invalid HTML comment !' => array( '', WP_HTML_Processor::COMMENT_AS_INVALID_HTML, ' Bang opener ' ), 'Invalid HTML comment ?' => array( '', WP_HTML_Processor::COMMENT_AS_INVALID_HTML, ' Question opener ' ), 'CDATA comment' => array( '', WP_HTML_Processor::COMMENT_AS_CDATA_LOOKALIKE, ' cdata body ' ), - 'Processing instriction comment' => array( '', WP_HTML_Processor::COMMENT_AS_PI_NODE_LOOKALIKE, ' Instruction body. ', 'pi-target' ), - 'Processing instriction php' => array( '', WP_HTML_Processor::COMMENT_AS_PI_NODE_LOOKALIKE, ' const HTML_COMMENT = true; ', 'php' ), + 'Processing instruction comment' => array( '', WP_HTML_Processor::COMMENT_AS_PI_NODE_LOOKALIKE, ' Instruction body. ', 'pi-target' ), + 'Processing instruction php' => array( '', WP_HTML_Processor::COMMENT_AS_PI_NODE_LOOKALIKE, ' const HTML_COMMENT = true; ', 'php' ), ); } From e0a0e9758202034d543a5e3770a654eccbd19392 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 12:56:55 +0200 Subject: [PATCH 18/34] Tests: HTML API: Fix grammar "Verifies what when" to "Verifies that when". Corrects two BUTTON-in-scope test docblocks where "what" should have been "that". --- tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRules.php b/tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRules.php index ffc99ad58fd8e..da6d959eb75e0 100644 --- a/tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRules.php +++ b/tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRules.php @@ -163,7 +163,7 @@ public function test_in_body_button_with_no_button_in_scope() { } /** - * Verifies what when inserting a BUTTON element, when a BUTTON is already in scope, + * Verifies that when inserting a BUTTON element, when a BUTTON is already in scope, * that the open button is closed with all other elements inside of it. * * @ticket 58961 @@ -195,7 +195,7 @@ public function test_in_body_button_with_button_in_scope_as_parent() { } /** - * Verifies what when inserting a BUTTON element, when a BUTTON is already in scope, + * Verifies that when inserting a BUTTON element, when a BUTTON is already in scope, * that the open button is closed with all other elements inside of it, even if the * BUTTON in scope is not a direct parent of the new BUTTON element. * From 41f520bfe2e0de3fd75db3ca52819b3027d73df6 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 12:57:06 +0200 Subject: [PATCH 19/34] Tests: HTML API: Fix typo "BLOCKQOUTE" in list element tests. Corrects three occurrences of "BLOCKQOUTE" to "BLOCKQUOTE" in assertion messages for LI, DD, and DT closing tests. --- .../html-api/wpHtmlProcessorSemanticRulesListElements.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRulesListElements.php b/tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRulesListElements.php index 0c7e3422f09fc..e89896da2298e 100644 --- a/tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRulesListElements.php +++ b/tests/phpunit/tests/html-api/wpHtmlProcessorSemanticRulesListElements.php @@ -94,7 +94,7 @@ public function test_in_body_li_generates_implied_end_tags_inside_open_li_but_st $this->assertSame( array( 'HTML', 'BODY', 'LI', 'BLOCKQUOTE', 'LI' ), $processor->get_breadcrumbs(), - 'LI should have left the BLOCKQOUTE open, but closed it.' + 'LI should have left the BLOCKQUOTE open, but closed it.' ); } @@ -234,7 +234,7 @@ public function test_in_body_dd_generates_implied_end_tags_inside_open_dd_but_st $this->assertSame( array( 'HTML', 'BODY', 'DD', 'BLOCKQUOTE', 'DD' ), $processor->get_breadcrumbs(), - 'DD should have left the BLOCKQOUTE open, but closed it.' + 'DD should have left the BLOCKQUOTE open, but closed it.' ); } @@ -370,7 +370,7 @@ public function test_in_body_dt_generates_implied_end_tags_inside_open_dt_but_st $this->assertSame( array( 'HTML', 'BODY', 'DT', 'BLOCKQUOTE', 'DT' ), $processor->get_breadcrumbs(), - 'DT should have left the BLOCKQOUTE open, but closed it.' + 'DT should have left the BLOCKQUOTE open, but closed it.' ); } From ceebce87bcd86ac24b2b906c55b911e41f091505 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 12:57:19 +0200 Subject: [PATCH 20/34] Tests: HTML API: Fix typo "Compete document" in bookmark test data. Corrects "Compete" to "Complete" in the data provider key for incomplete-HTML seek tests, adjusting alignment to match. --- tests/phpunit/tests/html-api/wpHtmlTagProcessor-bookmark.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/tests/html-api/wpHtmlTagProcessor-bookmark.php b/tests/phpunit/tests/html-api/wpHtmlTagProcessor-bookmark.php index 0e72f9d726835..beb4cc60f6d95 100644 --- a/tests/phpunit/tests/html-api/wpHtmlTagProcessor-bookmark.php +++ b/tests/phpunit/tests/html-api/wpHtmlTagProcessor-bookmark.php @@ -518,7 +518,7 @@ public function test_can_seek_after_document_ends( $html_with_target_element ) { */ public static function data_incomplete_html_with_target_nodes_for_seeking() { return array( - 'Compete document' => array( '
' ), + 'Complete document' => array( '
' ), 'Incomplete document' => array( '
Date: Mon, 1 Jun 2026 12:57:29 +0200 Subject: [PATCH 21/34] Tests: HTML API: Fix typo "subesequent" in remove_class assertion messages. Corrects two occurrences of "subesequent" to "subsequent" in the assertion messages of the remove_class() test. --- tests/phpunit/tests/html-api/wpHtmlTagProcessor.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php b/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php index 22ace3890f469..1ff6e82c2058e 100644 --- a/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php +++ b/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php @@ -1523,11 +1523,11 @@ public function test_calling_remove_class_with_all_listed_class_names_removes_th $this->assertSame( '
Text
', $processor->get_updated_html(), - 'Updated HTML does not reflect class attribute removed via subesequent remove_class() calls' + 'Updated HTML does not reflect class attribute removed via subsequent remove_class() calls' ); $this->assertNull( $processor->get_attribute( 'class' ), - "get_attribute( 'class' ) did not return null for class attribute removed via subesequent remove_class() calls" + "get_attribute( 'class' ) did not return null for class attribute removed via subsequent remove_class() calls" ); } From 5a35fcf233533dd315efcee5d4d6d6763468c7ab Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 12:57:40 +0200 Subject: [PATCH 22/34] Tests: HTML API: Fix grammar "why modifying" to "when modifying". Corrects "why" to "when" in the assertion message of a modifiable text transformation test. --- .../phpunit/tests/html-api/wpHtmlTagProcessorModifiableText.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/tests/html-api/wpHtmlTagProcessorModifiableText.php b/tests/phpunit/tests/html-api/wpHtmlTagProcessorModifiableText.php index f43d1fffaad0e..4a09403b7b23e 100644 --- a/tests/phpunit/tests/html-api/wpHtmlTagProcessorModifiableText.php +++ b/tests/phpunit/tests/html-api/wpHtmlTagProcessorModifiableText.php @@ -415,7 +415,7 @@ public function test_updates_basic_modifiable_text_on_supported_nodes( string $h $this->assertSame( $transformed, $processor->get_updated_html(), - "Should have transformed the HTML as expected why modifying the target node's modifiable text." + "Should have transformed the HTML as expected when modifying the target node's modifiable text." ); } From 8b6b3e9936d1e56ef2fb18dedccf24f86c22c9d1 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 17:54:47 +0200 Subject: [PATCH 23/34] docs: fix src/wp-includes/html-api/class-wp-html-attribute-token.php - Clarify $value_starts_at describes a byte offset, not the value itself - Clarify constructor @param $value_start as a byte offset --- src/wp-includes/html-api/class-wp-html-attribute-token.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/html-api/class-wp-html-attribute-token.php b/src/wp-includes/html-api/class-wp-html-attribute-token.php index fab66d827b451..3cf93b28905af 100644 --- a/src/wp-includes/html-api/class-wp-html-attribute-token.php +++ b/src/wp-includes/html-api/class-wp-html-attribute-token.php @@ -32,7 +32,7 @@ class WP_HTML_Attribute_Token { public $name; /** - * Attribute value. + * Byte offset in the input HTML where the attribute value starts. * * @since 6.2.0 * @@ -101,7 +101,7 @@ class WP_HTML_Attribute_Token { * @since 6.5.0 Replaced `end` with `length` to more closely match `substr()`. * * @param string $name Attribute name. - * @param int $value_start Attribute value. + * @param int $value_start Byte offset where the attribute value starts. * @param int $value_length Number of bytes attribute value spans. * @param int $start The string offset where the attribute name starts. * @param int $length Byte length of the entire attribute name or name and value pair expression. From bc2ac1b960dbcddb122f14fd1d8074e6be867b07 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 17:54:45 +0200 Subject: [PATCH 24/34] docs: fix src/wp-includes/html-api/class-wp-html-decoder.php - Fix broken class name in decode_text_node() example (WP_HTML_Decode -> WP_HTML_Decoder) - Fix broken class name in decode_attribute() example (WP_HTML_Decode -> WP_HTML_Decoder) --- src/wp-includes/html-api/class-wp-html-decoder.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/html-api/class-wp-html-decoder.php b/src/wp-includes/html-api/class-wp-html-decoder.php index d902f4b7cabc4..0a781a88efc77 100644 --- a/src/wp-includes/html-api/class-wp-html-decoder.php +++ b/src/wp-includes/html-api/class-wp-html-decoder.php @@ -83,7 +83,7 @@ public static function attribute_starts_with( $haystack, $search_text, $case_sen * * Example: * - * 'β€œπŸ˜„β€' === WP_HTML_Decode::decode_text_node( '“😄”' ); + * 'β€œπŸ˜„β€' === WP_HTML_Decoder::decode_text_node( '“😄”' ); * * @since 6.6.0 * @@ -103,7 +103,7 @@ public static function decode_text_node( $text ): string { * * Example: * - * 'β€œπŸ˜„β€' === WP_HTML_Decode::decode_attribute( '“😄”' ); + * 'β€œπŸ˜„β€' === WP_HTML_Decoder::decode_attribute( '“😄”' ); * * @since 6.6.0 * From 2861d93390fcff972257470cbff2a22f3cba701e Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 17:54:48 +0200 Subject: [PATCH 25/34] docs: fix src/wp-includes/html-api/class-wp-html-doctype-info.php - Correct compatibility-mode alias: quirks mode is `BackCompat`, not `CSS1Compat`. --- src/wp-includes/html-api/class-wp-html-doctype-info.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/html-api/class-wp-html-doctype-info.php b/src/wp-includes/html-api/class-wp-html-doctype-info.php index 1e57afb3fd550..2e21e033babc1 100644 --- a/src/wp-includes/html-api/class-wp-html-doctype-info.php +++ b/src/wp-includes/html-api/class-wp-html-doctype-info.php @@ -138,7 +138,7 @@ class WP_HTML_Doctype_Info { * indicate one of three possible document compatibility modes: * * - "no-quirks" and "limited-quirks" modes (also called "standards" mode). - * - "quirks" mode (also called `CSS1Compat` mode). + * - "quirks" mode (also called `BackCompat` mode). * * An appropriate DOCTYPE is one encountered in the "initial" insertion mode, * before the HTML element has been opened and before finding any other From d749176db20bdb8de38ddf08acf186208fe3f794 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 17:54:58 +0200 Subject: [PATCH 26/34] docs: fix src/wp-includes/html-api/class-wp-html-open-elements.php - set_pop_handler() docblock: "pushed item" -> "popped item" - at() docblock: clarify it returns the node, not the node's name --- src/wp-includes/html-api/class-wp-html-open-elements.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/html-api/class-wp-html-open-elements.php b/src/wp-includes/html-api/class-wp-html-open-elements.php index 0cd1f0fc45e07..2f0ab0a512c50 100644 --- a/src/wp-includes/html-api/class-wp-html-open-elements.php +++ b/src/wp-includes/html-api/class-wp-html-open-elements.php @@ -78,7 +78,7 @@ class WP_HTML_Open_Elements { * Sets a pop handler that will be called when an item is popped off the stack of * open elements. * - * The function will be called with the pushed item as its argument. + * The function will be called with the popped item as its argument. * * @since 6.6.0 * @@ -103,7 +103,7 @@ public function set_push_handler( Closure $handler ): void { } /** - * Returns the name of the node at the nth position on the stack + * Returns the node at the nth position on the stack * of open elements, or `null` if no such position exists. * * Note that this uses a 1-based index, which represents the @@ -114,7 +114,7 @@ public function set_push_handler( Closure $handler ): void { * * @param int $nth Retrieve the nth item on the stack, with 1 being * the top element, 2 being the second, etc... - * @return WP_HTML_Token|null Name of the node on the stack at the given location, + * @return WP_HTML_Token|null The node on the stack at the given location, * or `null` if the location isn't on the stack. */ public function at( int $nth ): ?WP_HTML_Token { From e10db88debb4ada1c304576c44eccf6a34d25523 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 17:55:42 +0200 Subject: [PATCH 27/34] docs: fix src/wp-includes/html-api/class-wp-html-processor.php - Correct bookmark_token() @return: method returns string or throws; never false. - Add missing @since 6.7.0 to create_full_parser(). --- src/wp-includes/html-api/class-wp-html-processor.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/html-api/class-wp-html-processor.php b/src/wp-includes/html-api/class-wp-html-processor.php index 35d91fad3129c..e3760b7e735ac 100644 --- a/src/wp-includes/html-api/class-wp-html-processor.php +++ b/src/wp-includes/html-api/class-wp-html-processor.php @@ -341,6 +341,8 @@ public static function create_fragment( $html, $context = '', $encoding = * isn't UTF-8, first convert the document to UTF-8, then pass in the * converted HTML. * + * @since 6.7.0 + * * @param string $html Input HTML document to process. * @param string|null $known_definite_encoding Optional. If provided, specifies the charset used * in the input byte stream. Currently must be UTF-8. @@ -5208,7 +5210,7 @@ private function step_in_foreign_content(): bool { * * @throws Exception When unable to allocate requested bookmark. * - * @return string|false Name of created bookmark, or false if unable to create. + * @return string Name of created bookmark. */ private function bookmark_token() { if ( ! parent::set_bookmark( ++$this->bookmark_counter ) ) { From cbd9b4186e56325793f571b7d54b78d8d2b83026 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 17:58:12 +0200 Subject: [PATCH 28/34] docs: fix src/wp-includes/html-api/class-wp-html-tag-processor.php - Fix stale API: get_next_tag() -> next_tag() in paused_at_incomplete_token() example - Correct token_length arithmetic in $token_length property examples - Remove inaccurate sentence claiming Tag Processor only supports tag tokens in next_token() docblock - Fix broken example in subdivide_text_appropriately():  (DC3, non-whitespace) -> (CR, whitespace) - Remove NOSCRIPT from special raw-text elements list in class docblock (Tag Processor descends into NOSCRIPT) - Fix spelling: NOFRAME -> NOFRAMES in class docblock special-elements list --- .../html-api/class-wp-html-tag-processor.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/wp-includes/html-api/class-wp-html-tag-processor.php b/src/wp-includes/html-api/class-wp-html-tag-processor.php index 77c1a471db5b1..d956e691dff82 100644 --- a/src/wp-includes/html-api/class-wp-html-tag-processor.php +++ b/src/wp-includes/html-api/class-wp-html-tag-processor.php @@ -298,7 +298,7 @@ * closing the SCRIPT from inside a JavaScript string. E.g. `console.log( '' )`. * - `TITLE` and `TEXTAREA` whose contents are treated as plaintext and then any * character references are decoded. E.g. `1 < 2 < 3` becomes `1 < 2 < 3`. - * - `IFRAME`, `NOSCRIPT`, `NOEMBED`, `NOFRAME`, `STYLE` whose contents are treated as + * - `IFRAME`, `NOEMBED`, `NOFRAMES`, `STYLE` whose contents are treated as * raw plaintext and left as-is. E.g. `1 < 2 < 3` remains `1 < 2 < 3`. * * #### Other tokens with modifiable text. @@ -614,12 +614,12 @@ class WP_HTML_Tag_Processor { * Example: * *
... - * 012345678901234 - * - token length is 14 - 0 = 14 + * 0123456789012345 + * - token length is 15 - 0 = 15 * * a is a token. * 0123456789 123456789 123456789 - * - token length is 17 - 2 = 15 + * - token length is 18 - 2 = 16 * * @since 6.5.0 * @@ -926,8 +926,6 @@ public function next_tag( $query = null ): bool { * - a DOCTYPE declaration. * - a processing instruction, e.g. ``. * - * The Tag Processor currently only supports the tag token. - * * @since 6.5.0 * @since 6.7.0 Recognizes CDATA sections within foreign content. * @@ -1149,7 +1147,7 @@ private function base_class_next_token(): bool { * Example: * * $processor = new WP_HTML_Tag_Processor( 'subdivide_text_appropriately(); * - * $processor = new WP_HTML_Tag_Processor( " \r\n\tMore" ); + * $processor = new WP_HTML_Tag_Processor( " \r\n\tMore" ); * true === $processor->next_token(); // Text is "␀ ␀␉More". * true === $processor->subdivide_text_appropriately(); // Text is "␀ ␀␉". * true === $processor->next_token(); // Text is "More". From 7ffb5178dba92403c53e1f10a56e47150c6a5d15 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 17:54:56 +0200 Subject: [PATCH 29/34] docs: fix src/wp-includes/html-api/class-wp-html-token.php - Correct @var for $bookmark_name from string to string|null to match nullable property --- src/wp-includes/html-api/class-wp-html-token.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/html-api/class-wp-html-token.php b/src/wp-includes/html-api/class-wp-html-token.php index d5e51ac29007f..d95f2934c5c78 100644 --- a/src/wp-includes/html-api/class-wp-html-token.php +++ b/src/wp-includes/html-api/class-wp-html-token.php @@ -29,7 +29,7 @@ class WP_HTML_Token { * * @since 6.4.0 * - * @var string + * @var string|null */ public $bookmark_name = null; From 3b7debd6add6572024f59aa0b583f7fc0201ccca Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 17:55:32 +0200 Subject: [PATCH 30/34] docs: fix tests/phpunit/tests/html-api/wpHtmlProcessorHtml5lib.php - Correct should_skip_test() @param names/types to match signature ($test_context_element, $test_name) - Update parse_html5_dat_testfile() @return description to reflect 4-element arrays (line number, context element, HTML, DOM) --- .../tests/html-api/wpHtmlProcessorHtml5lib.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/phpunit/tests/html-api/wpHtmlProcessorHtml5lib.php b/tests/phpunit/tests/html-api/wpHtmlProcessorHtml5lib.php index a03a9ab806a93..16c4167614019 100644 --- a/tests/phpunit/tests/html-api/wpHtmlProcessorHtml5lib.php +++ b/tests/phpunit/tests/html-api/wpHtmlProcessorHtml5lib.php @@ -132,8 +132,8 @@ public function data_external_html5lib_tests() { /** * Determines whether a test case should be skipped. * - * @param string $test_name Test name. - * @param string $expected_tree Expected HTML tree structure. + * @param string|null $test_context_element Context element for fragment parsing, or null for full document parsing. + * @param string $test_name Test name. * * @return bool True if the test case should be skipped. False otherwise. */ @@ -338,12 +338,13 @@ static function ( $a, $b ) { } /** - * Convert a given Html5lib test file into a test triplet. + * Convert a given Html5lib test file into a series of test cases. * * @param string $filename Path to `.dat` file with test cases. * - * @return array|Generator Test triplets of HTML fragment context element, - * HTML, and the DOM structure it represents. + * @return array|Generator Test cases as 4-element arrays of line number, + * HTML fragment context element, HTML, and the + * DOM structure it represents. */ public static function parse_html5_dat_testfile( $filename ) { $handle = fopen( $filename, 'r', false ); From e65f38b2641d2da3fc81b7f6a88840a43e650d78 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 17:55:17 +0200 Subject: [PATCH 31/34] docs: fix tests/phpunit/tests/html-api/wpHtmlTagProcessor.php - Fix variable name in XSS example (`$p` -> `$processor`) - Correct description of set_attribute escaping (does not call esc_attr) --- tests/phpunit/tests/html-api/wpHtmlTagProcessor.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php b/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php index 22ace3890f469..91a8fe45f679a 100644 --- a/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php +++ b/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php @@ -886,11 +886,11 @@ public function test_attribute_ops_on_tag_closer_do_not_change_the_markup() { * $processor = new WP_HTML_Tag_Processor( '
' ); * $processor->next_tag(); * $processor->set_attribute('class', '" onclick="alert'); - * echo $p; + * echo $processor; * //
* ``` * - * To prevent it, `set_attribute` calls `esc_attr()` on its given values. + * To prevent it, `set_attribute` escapes dangerous characters (`"`, `'`, `<`, `>`, `&`) using HTML character references. * * ```php *
From f3cab0deed70e3fe0016e7fb28a95f22f04191a9 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 19:14:22 +0200 Subject: [PATCH 32/34] Fix carriage return and line feed symbols --- src/wp-includes/html-api/class-wp-html-tag-processor.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/html-api/class-wp-html-tag-processor.php b/src/wp-includes/html-api/class-wp-html-tag-processor.php index d86ee57d2aaf4..f11fe9cde5087 100644 --- a/src/wp-includes/html-api/class-wp-html-tag-processor.php +++ b/src/wp-includes/html-api/class-wp-html-tag-processor.php @@ -3554,8 +3554,8 @@ public function get_full_comment_text(): ?string { * false === $processor->subdivide_text_appropriately(); * * $processor = new WP_HTML_Tag_Processor( " \r\n\tMore" ); - * true === $processor->next_token(); // Text is "␀ ␀␉More". - * true === $processor->subdivide_text_appropriately(); // Text is "␀ ␀␉". + * true === $processor->next_token(); // Text is "␍ βŠβ‰More". + * true === $processor->subdivide_text_appropriately(); // Text is "␍ βŠβ‰". * true === $processor->next_token(); // Text is "More". * false === $processor->subdivide_text_appropriately(); * From 251ace23d8b641fce6b18ac532dd6924898dc549 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 21:46:05 +0200 Subject: [PATCH 33/34] Correct array|Generator type Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- tests/phpunit/tests/html-api/wpHtmlProcessorHtml5lib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/tests/html-api/wpHtmlProcessorHtml5lib.php b/tests/phpunit/tests/html-api/wpHtmlProcessorHtml5lib.php index 16c4167614019..b5d86be06effb 100644 --- a/tests/phpunit/tests/html-api/wpHtmlProcessorHtml5lib.php +++ b/tests/phpunit/tests/html-api/wpHtmlProcessorHtml5lib.php @@ -342,9 +342,9 @@ static function ( $a, $b ) { * * @param string $filename Path to `.dat` file with test cases. * - * @return array|Generator Test cases as 4-element arrays of line number, - * HTML fragment context element, HTML, and the - * DOM structure it represents. + * @return Generator Test cases as 4-element arrays of line number, + * HTML fragment context element, HTML, and the + * DOM structure it represents. */ public static function parse_html5_dat_testfile( $filename ) { $handle = fopen( $filename, 'r', false ); From af2c0dcd5635340eebd653d5678b5f4f025a78f6 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Mon, 1 Jun 2026 21:50:19 +0200 Subject: [PATCH 34/34] Use preferred get_updated_html() method in docs --- tests/phpunit/tests/html-api/wpHtmlTagProcessor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php b/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php index ad3851d9be6e7..a066543d8e11f 100644 --- a/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php +++ b/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php @@ -886,7 +886,7 @@ public function test_attribute_ops_on_tag_closer_do_not_change_the_markup() { * $processor = new WP_HTML_Tag_Processor( '
' ); * $processor->next_tag(); * $processor->set_attribute('class', '" onclick="alert'); - * echo $processor; + * echo $processor->get_updated_html(); * //
* ``` *