HTML API: Ensure correct normalization of namespace-prefixed attribute names#12140
HTML API: Ensure correct normalization of namespace-prefixed attribute names#12140sirreal wants to merge 9 commits into
Conversation
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
|
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. Verified that the space-to-colon replacement in 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
Fixes an issue where HTML Processor serialization issue where adjusted foreign attributes such as
xlink:hrefwere emitted with a space separator asxlink href. After normalization, this would become two attributes,xlinkandhref.This keeps duplicate detection keyed to the adjusted qualified attribute name while converting adjusted foreign attributes back to colon-prefixed names when writing HTML. It also adds regression coverage for both
WP_HTML_Processor::normalize()andserialize_token().Trac ticket: https://core.trac.wordpress.org/ticket/65372
Use of AI Tools
AI assistance: Yes
Tool(s): Codex
Model(s): GPT-5
Used for: Discover issue with fuzz testing, add the regression test, implement fix, perform verification, and draft this PR description.