We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b30cfcb commit c29f5d6Copy full SHA for c29f5d6
tests/phpunit/tests/html-api/wpHtmlProcessor.php
@@ -630,4 +630,17 @@ public function test_class_list_quirks_mode() {
630
$class_list
631
);
632
}
633
+
634
+ /**
635
+ * Ensures that the tag processor matches class names with null bytes correctly.
636
+ *
637
+ * @ticket 61531
638
639
+ * @covers ::has_class
640
+ */
641
+ public function test_has_class_null_byte_class_name() {
642
+ $processor = WP_HTML_Processor::create_fragment( "<span class='null-byte-\0-there'></span>" );
643
+ $processor->next_tag();
644
+ $this->assertTrue( $processor->has_class( 'null-byte-�-there' ) );
645
+ }
646
0 commit comments