#60382 closed defect (bug) (fixed)
HTML API: WP_HTML_Processor::next_token nests void tags
| Reported by: | jonsurrell | Owned by: | jonsurrell |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.5 |
| Component: | HTML API | Version: | 6.5 |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: |
Description
When processing HTML like <br><br> with WP_HTML_Processor::next_tag(), 2 sibling BR tags are correctly found.
However, when using WP_HTML_Processor::next_token(), void tags are not correctly handled, resulting in breadcrumbs from the second BR tag like [ 'HTML', 'BODY', 'BR', 'BR' ].
Change History (8)
This ticket was mentioned in PR #5975 on WordPress/wordpress-develop by @jonsurrell.
3 years ago
#1
- Keywords has-patch has-unit-tests added
#3
@
3 years ago
HTML API: WP_HTML_Processor::next_token is an internal API (with @access private) so this may not be considered a bug.
This ticket was mentioned in PR #5975 on WordPress/wordpress-develop by @jonsurrell.
3 years ago
#4
Trac ticket: Core-60382
This currently only includes a failing test.
@jonsurrell commented on PR #5975:
3 years ago
#5
@dmsnell your fix looks good to me and fixes the test failures I saw in https://github.com/WordPress/wordpress-develop/pull/5794.
👍 This change looks good to me.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Trac ticket: https://core.trac.wordpress.org/ticket/60382