aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Serduke <davidserduke@gmail.com>2007-12-04 07:36:03 +0000
committerDavid Serduke <davidserduke@gmail.com>2007-12-04 07:36:03 +0000
commit8b74ba07aabc11c1e987e3c7dfe8314c23bb5452 (patch)
treec4d90236b632ff6811d3f6a3d211b25e363f055b
parentaee221d33c2db2c76639dabeca2b1e3d022e348e (diff)
downloadjquery-8b74ba07aabc11c1e987e3c7dfe8314c23bb5452.tar.gz
jquery-8b74ba07aabc11c1e987e3c7dfe8314c23bb5452.zip
For fix #1999 changed the RegExp to be non-greedy. Thanks emartin24.
-rw-r--r--src/ajax.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ajax.js b/src/ajax.js
index d4f2e1271..104961497 100644
--- a/src/ajax.js
+++ b/src/ajax.js
@@ -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 : "");
}