mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
For fix #1999 changed the RegExp to be non-greedy. Thanks emartin24.
This commit is contained in:
parent
aee221d33c
commit
8b74ba07aa
@ -200,7 +200,7 @@ jQuery.extend({
|
||||
if ( s.cache === false && s.type.toLowerCase() == "get" ) {
|
||||
var ts = (new Date()).getTime();
|
||||
// try replacing _= if it is there
|
||||
var ret = s.url.replace(/(\?|&)_=.*(&|$)/, "$1_=" + ts + "$2");
|
||||
var ret = s.url.replace(/(\?|&)_=.*?(&|$)/, "$1_=" + ts + "$2");
|
||||
// if nothing was replaced, add timestamp to the end
|
||||
s.url = ret + ((ret == s.url) ? (s.url.match(/\?/) ? "&" : "?") + "_=" + ts : "");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user