We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed8f34f commit f2fa469Copy full SHA for f2fa469
1 file changed
tests/phpunit/tests/html-api/wpHtmlProcessor.php
@@ -658,4 +658,17 @@ public function test_class_list_quirks_mode() {
658
$class_list
659
);
660
}
661
+
662
+ /**
663
+ * Ensures that the tag processor matches class names with null bytes correctly.
664
+ *
665
+ * @ticket 61531
666
667
+ * @covers ::has_class
668
+ */
669
+ public function test_has_class_null_byte_class_name() {
670
+ $processor = WP_HTML_Processor::create_fragment( "<span class='null-byte-\0-there'></span>" );
671
+ $processor->next_tag();
672
+ $this->assertTrue( $processor->has_class( 'null-byte-�-there' ) );
673
+ }
674
0 commit comments