[Pkg-javascript-commits] [dojo] 30/88: Fix request/script ignoring callback parameter as first URL argument (1.8 backport). refs #16240 !strict

David Prévot taffit at moszumanska.debian.org
Thu Aug 21 17:39:33 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag 1.8.5
in repository dojo.

commit 376d9740495b8ebc4fc0231a4c9443d2dfd89834
Author: Bryan Forbes <bryan at reigndropsfall.net>
Date:   Thu Oct 25 19:49:35 2012 +0000

    Fix request/script ignoring callback parameter as first URL argument (1.8 backport). refs #16240 !strict
    
    git-svn-id: http://svn.dojotoolkit.org/src/branches/1.8/dojo@29881 560b804f-0ae3-0310-86f3-f6aa0a117693
---
 request/script.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/request/script.js b/request/script.js
index bff59c2..16a2a68 100644
--- a/request/script.js
+++ b/request/script.js
@@ -129,8 +129,8 @@ define([
 		});
 
 		if(options.jsonp){
-			var queryParameter = (~url.indexOf('?') ? '&' : '?') + options.jsonp + '=';
-			if(url.indexOf(queryParameter) === -1){
+			var queryParameter = new RegExp('[?&]' + options.jsonp + '=');
+			if(!queryParameter.test(url)){
 				url += queryParameter +
 					(options.frameDoc ? 'parent.' : '') +
 					mid + '_callbacks.' + dfd.id;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/dojo.git



More information about the Pkg-javascript-commits mailing list