Ajax: use anchor tag for parsing urls

Fixes gh-1875
Closes gh-1880
This commit is contained in:
Ben Toews
2014-11-22 18:29:13 -07:00
committed by Dave Methvin
parent cfe468f29c
commit b091fdbafa
2 changed files with 31 additions and 20 deletions

View File

@@ -301,7 +301,7 @@ module( "ajax", {
}
]);
ajaxTest( "jQuery.ajax() - cross-domain detection", 7, function() {
ajaxTest( "jQuery.ajax() - cross-domain detection", 8, function() {
function request( url, title, crossDomainOrOptions ) {
return jQuery.extend( {
dataType: "jsonp",
@@ -351,6 +351,10 @@ module( "ajax", {
{
crossDomain: true
}
),
request(
" http://otherdomain.com",
"Cross-domain url with leading space is detected as cross-domain"
)
];
});