Skip to content
Permalink
Browse files

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

  • Loading branch information
davids549 committed Dec 4, 2007
1 parent aee221d commit 8b74ba07aabc11c1e987e3c7dfe8314c23bb5452
Showing with 1 addition and 1 deletion.
  1. +1 −1 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 : "");
}

0 comments on commit 8b74ba0

Please sign in to comment.
You can’t perform that action at this time.