diff options
author | John Resig <jeresig@gmail.com> | 2010-12-06 17:22:02 -0500 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2010-12-06 17:22:02 -0500 |
commit | 6c6812492858066043dd63525d94e2d334c96c3f (patch) | |
tree | 910bea6bddfae4e7b5e60b901f6cf5b0cbbcb97e /src/ajax.js | |
parent | b00ab56160a75c6aa3fdd21807c951ac8098aabc (diff) | |
parent | c04500a8347f381b069c036d9ac24b591b3fc6b7 (diff) | |
download | jquery-6c6812492858066043dd63525d94e2d334c96c3f.tar.gz jquery-6c6812492858066043dd63525d94e2d334c96c3f.zip |
Merge branch 'bug7531' of https://github.com/csnover/jquery into csnover-bug7531
Diffstat (limited to 'src/ajax.js')
-rw-r--r-- | src/ajax.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ajax.js b/src/ajax.js index e82a08299..d20ad76bc 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; |