WordPress/wp-includes/html-api
Bernhard Reiter 511dcb7520 HTML API: Add support for H1-H6 elements in the HTML Processor.
Previously these have been unsupported, but in this patch, support is added for the tags so that the HTML Processor can process documents containing them.

There was a design discussion about introducing a constant to communicate "any of the H1 - H6 elements" but this posed a number of challenges that don't need to be answered in this patch. For the time being, because the HTML specification treats H1 - H6 specially as a single kind of element, the HTML Processor uses an internal hard-coded string to indicate this. By using a hard-coded string it's possible to avoid introducing a class constant which cannot be made private due to PHP's class design. In the future, this will probably appear as a special constant in a new constant-containing class.

Props dmsnell, jonsurrell.
Fixes #60060.
Built from https://develop.svn.wordpress.org/trunk@57186


git-svn-id: http://core.svn.wordpress.org/trunk@56697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-12-13 17:53:19 +00:00
..
class-wp-html-active-formatting-elements.php HTML API: Adjust code styling to Gutenberg's linter's preferences. 2023-08-07 13:50:27 +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-open-elements.php HTML API: Add support for H1-H6 elements in the HTML Processor. 2023-12-13 17:53:19 +00:00
class-wp-html-processor-state.php HTML API: Store current token reference in HTML Processor state. 2023-09-12 15:12:17 +00:00
class-wp-html-processor.php HTML API: Add support for H1-H6 elements in the HTML Processor. 2023-12-13 17:53:19 +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-tag-processor.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-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