[wp-trac] [WordPress Trac] #59643: HTML API: Scan to end of tag when getting updated HTML output.

WordPress Trac noreply at wordpress.org
Tue Oct 17 07:25:15 UTC 2023


#59643: HTML API: Scan to end of tag when getting updated HTML output.
--------------------------+-----------------------------
 Reporter:  dmsnell       |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  HTML API      |    Version:  trunk
 Severity:  major         |   Keywords:  has-patch
  Focuses:                |
--------------------------+-----------------------------
 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.\

 ---

 Given that the bug introduced in #5475 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59643>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list