#59643 closed defect (bug) (fixed)
HTML API: Scan to end of tag when getting updated HTML output.
Reported by: | dmsnell | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 6.4 | Priority: | normal |
Severity: | major | Version: | 6.4 |
Component: | HTML API | Keywords: | has-patch |
Focuses: | Cc: |
Description (last modified by )
Fixes a bug introduced in #59607.
When applying updates to HTML, one step was left out in #59607 which updated the position of the end of the current tag. This made it possible to create bookmarks with null or earlier end positions than their start position. This in turn broke the Directive Processor in Gutenberg during the backport of changes from Core into Gutenberg.
In this patch, after applying updates, the HTML document is now scanned fully to the end of the current tag, updating the internal pointer to its end, so that nothing else will be broken or misaligned.\
---
Given that the bug introduced in #59607 has unknown impact, I strongly urge that we incorporate this patch into 6.4 if it's still possible. The fix should be complete and the reason for this confidence is that it was an obvious-in-hindsight mistake to not find the end of the existing tag when applying updates. Everything except this was called from the change that called the internals directly. Adding the missing piece should close up the erroneous cases.
Change History (8)
This ticket was mentioned in Slack in #core-editor by dmsnell. View the logs.
14 months ago
This ticket was mentioned in PR #5506 on WordPress/wordpress-develop by @dmsnell.
14 months ago
#4
Trac ticket: https://core.trac.wordpress.org/ticket/59643
Fixes a bug introduced in #5475.
When applying updates to HTML, one step was left out in #5475 which updated the position of the end of the current tag. This made it possible to create bookmarks with null or earlier end positions than their start position. This in turn broke the Directive Processor in Gutenberg during the backport of changes from Core into Gutenberg.
In this patch, after applying updates, the HTML document is now scanned fully to the end of the current tag, updating the internal pointer to its end, so that nothing else will be broken or misaligned.
cc: @ramonjd @andrewserong
#5
@
14 months ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 56953:
@SergeyBiryukov commented on PR #5506:
14 months ago
#6
Thanks for the PR! Merged in r56953.
#8
@
14 months ago
Backport into Gutenberg to finalize this is in Gutenberg#55703.
Took me a bit longer than I expected because I had some questions about the backport as it relates to 6.4 finishing up, but it seems like things are clear now.
That link should be to #59607 in Trac and https://github.com/WordPress/wordpress-develop/pull/5475