HTML API: Update Processing Instruction handling#12424
Conversation
…essing-instruction-parse
…oken fixtures Claude-Session: https://claude.ai/code/session_019T4FGdVaBpVbMRcBbQPehd
…essing-instruction-parse
The HTML standard has added Processing Instruction parsing. The HTML API needs updates to handle PI.
…essing-instruction-parse
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. |
| case '#comment': | ||
| case '#funky-comment': | ||
| case '#presumptuous-tag': | ||
| case '#processing-instruction': |
There was a problem hiding this comment.
We'll assume this is the intention. This entire insertion mode is gone from the current version of the spec: #9298
|
This adds PI handling to all the relevant insertion modes. PI handling is notably missing from two places: This change currently follows the spec for in head noscript but inserts the token in template. It's unclear whether these are an oversight or not. I've asked and will follow-up. |
PI nodes exist and are parsed. Bogus comments are just bugos comments.
See #12423 (merged here) for the test addition..
Trac ticket: https://core.trac.wordpress.org/ticket/65582
Use of AI Tools
AI assistance: Yes
Tool(s): Claude
Model(s): Fable 5
Used for: Initial implementation.
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.