mirror of
https://github.com/jquery/jquery.git
synced 2026-02-06 06:15:03 -05:00
Make sure that #... are trimmed from Ajax request URLs. Fixes #4987.
This commit is contained in:
@@ -10,6 +10,7 @@ var jsc = jQuery.now(),
|
||||
rts = /([?&])_=[^&]*(&?)/,
|
||||
rurl = /^(\w+:)?\/\/([^\/?#]+)/,
|
||||
r20 = /%20/g,
|
||||
rhash = /#[^#]*$/,
|
||||
|
||||
// Keep a copy of the old load method
|
||||
_load = jQuery.fn.load;
|
||||
@@ -205,6 +206,7 @@ jQuery.extend({
|
||||
var s = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings),
|
||||
jsonp, status, data, type = s.type.toUpperCase();
|
||||
|
||||
s.url = s.url.replace( rhash, "" );
|
||||
s.context = origSettings && origSettings.context || s;
|
||||
|
||||
// convert data if not already a string
|
||||
|
||||
Reference in New Issue
Block a user