From a088751a1b2c5761dab8de9d7da8602defb45b11 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 24 Sep 2010 09:37:03 -0500 Subject: [PATCH] Removing the second capture group. After the changes suggested by Jeff Roberson, the second capture group is no longer needed. See http://stackoverflow.com/questions/3771105/can-someone-tell-me-the-purpose-of-the-second-capture-group-in-the-jquery-rts-reg --- src/ajax.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ajax.js b/src/ajax.js index 9886fd70f..eebb81b24 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -7,7 +7,7 @@ var jsc = jQuery.now(), rbracket = /\[\]$/, jsre = /\=\?(&|$)/, rquery = /\?/, - rts = /([?&])_=[^&]*(&?)/, + rts = /([?&])_=[^&]*/, rurl = /^(\w+:)?\/\/([^\/?#]+)/, r20 = /%20/g, rhash = /#.*$/, @@ -275,7 +275,7 @@ jQuery.extend({ var ts = jQuery.now(); // try replacing _= if it is there - var ret = s.url.replace(rts, "$1_=" + ts + "$2"); + var ret = s.url.replace(rts, "$1_=" + ts); // if nothing was replaced, add timestamp to the end s.url = ret + ((ret === s.url) ? (rquery.test(s.url) ? "&" : "?") + "_=" + ts : ""); -- 2.39.5