WordPress/wp-includes/html-api
dmsnell bccb3e46e1 HTML API: Respect `tag_name` query arg in `HTML_Processor::next_tag()`
Previously the HTML Processor was ignoring the `tag_name` argument in
the `next_tag()` query if it existed. This was wrong adn would lead to
calling code finding the very next tag, regardless of tag name, instead
of the requested taag.

This patch adds the tag name detection code into `next_tag()` to fix
the bug and ensure that `next_tag()` always returns only when finding
a tag of the given name.

Developed in https://github.com/WordPress/wordpress-develop/pull/6980
Discussed in https://core.trac.wordpress.org/ticket/61581

Follow-up to [56274].

Fixes #61581.

Built from https://develop.svn.wordpress.org/trunk@58681


git-svn-id: http://core.svn.wordpress.org/trunk@58083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-06 10:20:15 +00:00
..
class-wp-html-active-formatting-elements.php HTML API: Apply linting changes to `@TODO` comments. 2023-12-20 12:36:31 +00:00
class-wp-html-attribute-token.php HTML API: Track spans of text with (offset, length) instead of (start, end). 2023-12-10 13:19:28 +00:00
class-wp-html-decoder.php HTML API: Optimize low-level parsing details in Tag Processor. 2024-07-01 23:36:15 +00:00
class-wp-html-open-elements.php HTML API: Support SELECT insertion mode. 2024-07-05 00:52:18 +00:00
class-wp-html-processor-state.php HTML API: Fix wrong @since tag. 2024-07-05 22:23:14 +00:00
class-wp-html-processor.php HTML API: Respect `tag_name` query arg in `HTML_Processor::next_tag()` 2024-07-06 10:20:15 +00:00
class-wp-html-span.php HTML API: Track spans of text with (offset, length) instead of (start, end). 2023-12-10 13:19:28 +00:00
class-wp-html-stack-event.php HTML API: Add missing subclass methods to HTML Processor and add token provenance. 2024-06-25 03:11:19 +00:00
class-wp-html-tag-processor.php HTML API: Optimize low-level parsing details in Tag Processor. 2024-07-01 23:36:15 +00:00
class-wp-html-text-replacement.php HTML API: Track spans of text with (offset, length) instead of (start, end). 2023-12-10 13:19:28 +00:00
class-wp-html-token.php HTML-API: Prevent unintended behavior when WP_HTML_Token is unserialized. 2023-12-06 16:05:19 +00:00
class-wp-html-unsupported-exception.php HTML-API: Introduce minimal HTML Processor. 2023-07-20 13:43:25 +00:00
html5-named-character-references.php Introduce Token Map: An optimized static translation class. 2024-05-23 19:56:08 +00:00