mirror of
git://develop.git.wordpress.org/
synced 2025-03-15 09:29:48 +01:00
HTML API: Scan to end of tag when getting updated HTML output.
When applying updates to HTML, one step was left out in [56941] 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 commit, 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. Follow-up to [56941]. Props dmsnell. Fixes #59643. git-svn-id: https://develop.svn.wordpress.org/trunk@56953 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
112f7da4c4
commit
c9ddecbf09
@ -2324,6 +2324,10 @@ class WP_HTML_Tag_Processor {
|
||||
continue;
|
||||
}
|
||||
|
||||
$tag_ends_at = strpos( $this->html, '>', $this->bytes_already_parsed );
|
||||
$this->tag_ends_at = $tag_ends_at;
|
||||
$this->bytes_already_parsed = $tag_ends_at;
|
||||
|
||||
return $this->html;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user