HTML API: Preserve XMP rawtext serialization#43
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
1 similar comment
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
Summary
XMPcontents like other rawtext serialization paths so raw<,>, and&are preserved.Root Cause
WP_HTML_Processor::serialize_token()flushed HTMLXMPas a self-contained element, but allowed it to fall through to the escaped text/RCDATA path. That changed rawtext semantics and made normalization non-idempotent for inputs such as<xmp>apples > oranges & <</xmp>.Validation
WP_TESTS_SKIP_INSTALL=1 ./vendor/bin/phpunit --group html-api,html-api-html5lib-tests./vendor/bin/phpcs src/wp-includes/html-api/class-wp-html-processor.php tests/phpunit/tests/html-api/wpHtmlProcessor-serialize.phpcodex-review-loopbefore final rebase: zero actionable findings on the XMP diff; a second post-rebase attempt was blocked by sandbox/external-review approval, with the remote compare confirming the final PR diff is the same two-file XMP change.