jQuery: The Write Less, Do More JavaScript Library

Changeset 4007

Show
Ignore:
Timestamp:
12/04/07 07:36:03 (5 months ago)
Author:
davidserduke
Message:

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

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/jquery/src/ajax.js

    r4006 r4007  
    201201            var ts = (new Date()).getTime(); 
    202202            // try replacing _= if it is there 
    203             var ret = s.url.replace(/(\?|&)_=.*(&|$)/, "$1_=" + ts + "$2"); 
     203            var ret = s.url.replace(/(\?|&)_=.*?(&|$)/, "$1_=" + ts + "$2"); 
    204204            // if nothing was replaced, add timestamp to the end 
    205205            s.url = ret + ((ret == s.url) ? (s.url.match(/\?/) ? "&" : "?") + "_=" + ts : "");