Skip to content

Commit 2481fcb

Browse files
committed
Add failing test for <!----->
1 parent 1ced6cf commit 2481fcb

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

tests/phpunit/tests/html-api/wpHtmlTagProcessor-token-scanning.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,26 @@ public function test_basic_assertion_html_comment() {
581581
);
582582
}
583583

584+
/**
585+
* Ensures that <!-----> HTML comment is properly parsed.
586+
*
587+
* @ticket 60170
588+
*
589+
* @since 6.5.0
590+
*
591+
* @covers WP_HTML_Tag_Processor::next_token
592+
*/
593+
public function test_html_comment_single_dash() {
594+
$processor = WP_HTML_Processor::create_fragment( '<!----->' );
595+
$processor->next_token();
596+
597+
$this->assertSame(
598+
'-',
599+
$processor->get_modifiable_text(),
600+
'Found incorrect modifiable text.'
601+
);
602+
}
603+
584604
/**
585605
* Ensures that normative DOCTYPE elements are properly parsed.
586606
*

0 commit comments

Comments
 (0)