Ajax: use anchor tag for parsing urls

Fixes gh-1875
Closes gh-1880
(cherry picked from commit 5a75278e4c5359e07303fc4d8e78a1cf94f6ad65)

Conflicts:
	src/ajax.js
This commit is contained in:
Ben Toews
2014-11-22 18:29:13 -07:00
committed by Dave Methvin
parent 9d1d90e7a2
commit de7ae8cd17
2 changed files with 33 additions and 22 deletions

View File

@@ -296,7 +296,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",
@@ -346,6 +346,10 @@ module( "ajax", {
{
crossDomain: true
}
),
request(
" http://otherdomain.com",
"Cross-domain url with leading space is detected as cross-domain"
)
];
});