HTML API: Treat </br> as tag opener in more places#9657
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. |
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. |
|
@desrosj looks like this is another victim of over-eager bots closing work that wasn’t merged. this patch was related to the Core ticket mentioned in the SVN commit, but the actual changeset was orthogonal to it. |
|
Moved to trac ticket https://core.trac.wordpress.org/ticket/65372, this has been appearing in fuzz testing. I added a to-do, this likely needs some extra work to handle attribute modification. It will basically need to rewrite the entire token span I think because any attribute-like syntax needs to be removed before rewriting to I would like to move this forward when those issues are handled. |
</br>gets special treatment in the HTML standard. It creates aBRelement with no attributes (regardless of whether it appears to have attributes in the HTML like</br attr-name>).</br>in::next_tag()like other openers.array()from::get_attribute_names_with_prefix()on</br>instead ofnulllike true close tags.To do:
</br>works with functions like::set_attribute()and::add_class(). These will require rewriting the tag to<br attrs …>or the attributes will be discarded.Trac ticket: https://core.trac.wordpress.org/ticket/65372
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.