Skip to content

Commit 66152db

Browse files
committed
Support single quotes in pub ids
1 parent 661382d commit 66152db

File tree

3 files changed

+1
-25
lines changed

3 files changed

+1
-25
lines changed

components/XML/Tests/W3CXMLConformanceTest.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,6 @@ public function test_w3c_xml_test_case($test_id, $test_type, $test_file, $descri
5858
return;
5959
}
6060

61-
// Skip tests with PUBLIC/SYSTEM identifiers that test quote character edge cases
62-
if ($test_type === 'valid' && preg_match('/ibm-valid-P1[23]-/', $test_id)) {
63-
$this->markTestSkipped("Skipping test case: {$test_id} – XMLProcessor doesn't support mixed quote styles in PUBLIC/SYSTEM identifiers.");
64-
return;
65-
}
66-
6761
if (in_array($test_id, [
6862
"not-sa01",
6963
"not-sa02",

components/XML/Tests/XMLProcessorTest.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2698,24 +2698,6 @@ public static function data_reserved_namespace_declarations() {
26982698
);
26992699
}
27002700

2701-
public function test_preserves_whitespace_with_xml_space_attribute() {
2702-
$xml = <<<XML
2703-
<root xml:space="preserve">
2704-
line1
2705-
<child> line2 </child>
2706-
</root>
2707-
XML;
2708-
$processor = XMLProcessor::create_from_string( $xml );
2709-
$processor->next_tag( 'root' );
2710-
2711-
$this->assertTrue( $processor->next_token(), 'Did not find first text node.' );
2712-
$this->assertEquals( "\n line1\n ", $processor->get_modifiable_text() );
2713-
2714-
$processor->next_tag( 'child' );
2715-
$this->assertTrue( $processor->next_token(), 'Did not find second text node.' );
2716-
$this->assertEquals( ' line2 ', $processor->get_modifiable_text() );
2717-
}
2718-
27192701
public function test_skips_over_doctypes_atts_and_conditional_sections() {
27202702
$xml = <<<XML
27212703
<!DOCTYPE html [

components/XML/class-xmlprocessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1902,7 +1902,7 @@ private function parse_next_tag() {
19021902
}
19031903

19041904
$pubid_char = " \r\nabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-()+,./:=?;!*#@\$_%";
1905-
if ( "'" === $opening_quote_char ) {
1905+
if ( '"' === $opening_quote_char ) {
19061906
$pubid_char .= "'";
19071907
}
19081908
$pubid_literal_length = strspn( $this->xml, $pubid_char, $at + 1 );

0 commit comments

Comments
 (0)