mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-05 05:04:31 +00:00
Correctly handle url's containing url's in WP_HTTP::make_absolute_url().
A valid relative URL could be mistaken for an absolute url if it contained a :// in any position of the url. Fixes #28001 git-svn-id: https://develop.svn.wordpress.org/trunk@29850 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -56,7 +56,11 @@ class Tests_HTTP_HTTP extends WP_UnitTestCase {
|
||||
array( 'otherfile.ext?query=string', 'http://example.com/file.ext?existing=query-string', 'http://example.com/otherfile.ext?query=string' ),
|
||||
|
||||
// A file with a leading dot
|
||||
array( '.ext', 'http://example.com/', 'http://example.com/.ext' )
|
||||
array( '.ext', 'http://example.com/', 'http://example.com/.ext' ),
|
||||
|
||||
// URls within URLs
|
||||
array( '/expected', 'http://example.com/sub/http://site.com/sub/', 'http://example.com/expected' ),
|
||||
array( '/expected/http://site.com/sub/', 'http://example.com/', 'http://example.com/expected/http://site.com/sub/' ),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user