Permalink
Browse files

do not match empty callback

  • Loading branch information...
1 parent b0e79a3 commit d0cf21653f1608b66bd16b6611312ad3fd76439f @igorw igorw committed Feb 6, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 reqwest.js
  2. +1 −1 reqwest.min.js
  3. +1 −1 src/reqwest.js
View
@@ -78,7 +78,7 @@
var reqId = uniqid++
, cbkey = o.jsonpCallback || 'callback' // the 'callback' key
, cbval = o.jsonpCallbackName || ('reqwest_' + reqId) // the 'callback' value
- , cbreg = new RegExp('((^|\\?|&)' + cbkey + ')=([^&]*)')
+ , cbreg = new RegExp('((^|\\?|&)' + cbkey + ')=([^&]+)')
, match = url.match(cbreg)
, script = doc.createElement('script')
, loaded = 0
View
Oops, something went wrong.
View
@@ -72,7 +72,7 @@
var reqId = uniqid++
, cbkey = o.jsonpCallback || 'callback' // the 'callback' key
, cbval = o.jsonpCallbackName || ('reqwest_' + reqId) // the 'callback' value
- , cbreg = new RegExp('((^|\\?|&)' + cbkey + ')=([^&]*)')
+ , cbreg = new RegExp('((^|\\?|&)' + cbkey + ')=([^&]+)')
, match = url.match(cbreg)
, script = doc.createElement('script')
, loaded = 0

0 comments on commit d0cf216

Please sign in to comment.