-
Notifications
You must be signed in to change notification settings - Fork 3.5k
HTML API: Handle area, br, embed, keygen, wbr #5895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 10 commits
c28ea1d
2a80cd2
41f9527
839a715
4a50cc1
fd26b12
94e0ff8
8e3b3f2
02ffaae
6f6e09b
15658e2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -392,4 +392,29 @@ public function test_in_body_any_other_end_tag_with_unclosed_non_special_element | |
| $this->assertSame( 'DIV', $p->get_tag(), "Expected to find DIV element, but found {$p->get_tag()} instead." ); | ||
| $this->assertSame( array( 'HTML', 'BODY', 'DIV', 'DIV' ), $p->get_breadcrumbs(), 'Failed to produce expected DOM nesting: SPAN should be closed and DIV should be its sibling.' ); | ||
| } | ||
|
|
||
| /** | ||
| * Ensures that support isn't accidentally partially added for the closing BR tag `</br>`. | ||
| * | ||
| * This tag closer has special rules and support shouldn't be added without implementing full support. | ||
| * | ||
| * > An end tag whose tag name is "br" | ||
| * > Parse error. Drop the attributes from the token, and act as described in the next entry; | ||
| * > i.e. act as if this was a "br" start tag token with no attributes, rather than the end | ||
| * > tag token that it actually is. | ||
| * | ||
| * When this handling is implemented, this test should be removed and `test_br_end_tag_special_behavior` | ||
| * should not be marked incomplete. It's not incorporated into the existing unsupported tag behavior test | ||
| * because the opening tag is supported; only the closing tag isn't. | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This mentions an incomplete test (by name
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks! good spotting. I've removed it. |
||
| * | ||
| * @covers WP_HTML_Processor::step_in_body | ||
| * | ||
| * @ticket 60283 | ||
| */ | ||
| public function test_br_end_tag_unsupported() { | ||
| $p = WP_HTML_Processor::create_fragment( '</br>' ); | ||
|
|
||
| $this->assertFalse( $p->next_tag(), 'Found a BR tag that should not be handled.' ); | ||
| $this->assertSame( WP_HTML_Processor::ERROR_UNSUPPORTED, $p->get_last_error() ); | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can deal with this later, it's tricky 🙂