Ticket #2020: 2020.diff
| File 2020.diff, 1.0 KB (added by davidserduke, 4 years ago) |
|---|
-
src/ajax.js
151 151 lastModified: {}, 152 152 153 153 ajax: function( s ) { 154 var jsonp, jsre = /=(\?|%3F) /g, status, data;154 var jsonp, jsre = /=(\?|%3F)(&|$)/g, status, data; 155 155 156 156 // Extend the settings, but re-extend 's' so that it can be 157 157 // checked again later (in the test suite, specifically) … … 177 177 178 178 // Replace the =? sequence both in the query string and the data 179 179 if ( s.data ) 180 s.data = (s.data + "").replace(jsre, "=" + jsonp );181 s.url = s.url.replace(jsre, "=" + jsonp );180 s.data = (s.data + "").replace(jsre, "=" + jsonp + "$2"); 181 s.url = s.url.replace(jsre, "=" + jsonp + "$2"); 182 182 183 183 // We need to make sure 184 184 // that a JSONP style response is executed properly … … 192 192 // Garbage collect 193 193 window[ jsonp ] = undefined; 194 194 try{ delete window[ jsonp ]; } catch(e){} 195 if (head) 196 head.removeChild( script ); 195 197 }; 196 198 } 197 199
