#60382 closed defect (bug) (fixed)
HTML API: WP_HTML_Processor::next_token nests void tags
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.5 | Priority: | normal |
| Severity: | normal | Version: | 6.5 |
| Component: | HTML API | Keywords: | has-patch has-unit-tests |
| Focuses: | Cc: |
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.
22 months ago
#1
- Keywords has-patch has-unit-tests added
#3
@
22 months 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.
22 months ago
#4
Trac ticket: Core-60382
This currently only includes a failing test.
@jonsurrell commented on PR #5975:
22 months 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.
Trac ticket: https://core.trac.wordpress.org/ticket/60382