X-Git-Url: http://git.asbjorn.biz/?p=jquery.git;a=blobdiff_plain;f=src%2Fajax.js;h=61b9c438efa1185dfb8f22efd79379afe7aa1efd;hp=d10b9311293d18614e7e3782f996122282b18fe7;hb=2a0c7d702b83a6b2e40eb79a5d6ea94d74f3090d;hpb=0838bdf52cf9f27ebc2bbee74fd7170e2d854c11 diff --git a/src/ajax.js b/src/ajax.js index d10b931..61b9c43 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -198,7 +198,10 @@ jQuery.extend({ var s = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings), jsonp, status, data, type = s.type.toUpperCase(), noContent = rnoContent.test(type); - s.url = s.url.replace( rhash, "" ); + // toString fixes people passing a window.location or + // document.location to $.ajax, which worked in 1.4.2 and + // earlier (bug #7531). It should be removed in 1.5. + s.url = s.url.toString().replace( rhash, "" ); // Use original (not extended) context object if it was provided s.context = origSettings && origSettings.context != null ? origSettings.context : s;