Fix: Update Interactivity API Use of Private HTML API Classes to avoid Crash#56928
Conversation
…d Crash Previously the HTML API was using a mixture of approaches in its helper classes for describing spans of text. One was (start, end) and the other was (start, length). In WordPress/wordpress-develop#5721 these were all normalized to (start, length) but the Interactivity API was not updated in concert with that change. In this patch the `inner_html` methods are updated to use the appropriate formats. A following PR is necessary to update the compat layer so that crashes don't appear on sites running older versions of WordPress with this updated code.
|
This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress. If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged. If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack. Thank you! ❤️ View changed files❔ lib/compat/wordpress-6.5/html-api/class-gutenberg-html-attribute-token-6-5.php ❔ lib/compat/wordpress-6.5/html-api/class-gutenberg-html-span-6-5.php ❔ lib/compat/wordpress-6.5/html-api/class-gutenberg-html-tag-processor-6-5.php ❔ lib/compat/wordpress-6.5/html-api/class-gutenberg-html-text-replacement-6-5.php ❔ lib/experimental/interactivity-api/class-wp-directive-processor.php ❔ lib/load.php |
|
Flaky tests detected in 5121f03. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7159297188
|
73f81be to
0e9b36f
Compare
Previously the HTML API was using a mixture of approaches in its helper classes for describing spans of text. One was (start, end) and the other was (start, length). In WordPress/wordpress-develop#5721 these were all normalized to (start, length) but the Interactivity API was not updated in concert with that change.
In this patch the
inner_htmlmethods are updated to use the appropriate formats.A following PR is necessary to update the compat layer so that crashes don't appear on sites running older versions of WordPress with this updated code.
cc: @luisherranz @ockham
What?
Why?
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast