Commit 8b74ba07 authored by David Serduke's avatar David Serduke

For fix #1999 changed the RegExp to be non-greedy. Thanks emartin24.

parent aee221d3
...@@ -200,7 +200,7 @@ jQuery.extend({ ...@@ -200,7 +200,7 @@ jQuery.extend({
if ( s.cache === false && s.type.toLowerCase() == "get" ) { if ( s.cache === false && s.type.toLowerCase() == "get" ) {
var ts = (new Date()).getTime(); var ts = (new Date()).getTime();
// try replacing _= if it is there // 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 // if nothing was replaced, add timestamp to the end
s.url = ret + ((ret == s.url) ? (s.url.match(/\?/) ? "&" : "?") + "_=" + ts : ""); s.url = ret + ((ret == s.url) ? (s.url.match(/\?/) ? "&" : "?") + "_=" + ts : "");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment