aboutsummaryrefslogtreecommitdiffstats
path: root/src/ajax.js
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2010-12-06 17:22:02 -0500
committerJohn Resig <jeresig@gmail.com>2010-12-06 17:22:02 -0500
commit6c6812492858066043dd63525d94e2d334c96c3f (patch)
tree910bea6bddfae4e7b5e60b901f6cf5b0cbbcb97e /src/ajax.js
parentb00ab56160a75c6aa3fdd21807c951ac8098aabc (diff)
parentc04500a8347f381b069c036d9ac24b591b3fc6b7 (diff)
downloadjquery-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.js5
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;