Changeset 55370
- Timestamp:
- 02/21/2023 01:47:57 AM (22 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-http.php
r55063 r55370 1014 1014 } 1015 1015 1016 // Add the fragment. 1017 if ( ! empty( $relative_url_parts['fragment'] ) ) { 1018 $path .= '#' . $relative_url_parts['fragment']; 1019 } 1020 1016 1021 return $absolute_path . '/' . ltrim( $path, '/' ); 1017 1022 } -
trunk/tests/phpunit/tests/http/http.php
r55029 r55370 10 10 11 11 /** 12 * @ticket 20434 13 * @ticket 56231 14 * 12 15 * @dataProvider make_absolute_url_testcases 13 16 * … … 67 70 // Schemeless URL's (not valid in HTTP Headers, but may be used elsewhere). 68 71 array( '//example.com/sub/', 'https://example.net', 'https://example.com/sub/' ), 72 73 // URLs with fragments. 74 array( '/path#frag', 'http://example.org/', 'http://example.org/path#frag' ), 75 array( '/path/#frag', 'http://example.org/', 'http://example.org/path/#frag' ), 76 array( '/path#frag&ment=1', 'http://example.org/', 'http://example.org/path#frag&ment=1' ), 77 array( '/path?query=string#frag', 'http://example.org/', 'http://example.org/path?query=string#frag' ), 78 array( '/path?query=string%23frag', 'http://example.org/', 'http://example.org/path?query=string%23frag' ), 69 79 ); 70 80 }
Note: See TracChangeset
for help on using the changeset viewer.