X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fajax.js;h=d20ad76bc6171fb81ce7be73e7e4b2c7e29c6b88;hb=6c6812492858066043dd63525d94e2d334c96c3f;hp=e82a082992ac976c798b4af3fab5938420ba0aea;hpb=b00ab56160a75c6aa3fdd21807c951ac8098aabc;p=jquery.git diff --git a/src/ajax.js b/src/ajax.js index e82a082..d20ad76 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).replace( rhash, "" ); // Use original (not extended) context object if it was provided s.context = origSettings && origSettings.context != null ? origSettings.context : s;