[Pkg-javascript-commits] [dojo] 65/87: Fix for handled quoted values in IE branch of code, fixes #7479, #13084 on IE !strict. Thanks to ptwobrussell for basis of patch. Backport to 1.7

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


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

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

commit 346476d980b9b17bd70ec25e888f27d7fb763e45
Author: Colin Snover <github.com at zetafleet.com>
Date:   Fri Nov 23 23:49:15 2012 +0000

    Fix for handled quoted values in IE branch of code, fixes #7479, #13084 on IE !strict. Thanks to ptwobrussell for basis of patch. Backport to 1.7
    
    git-svn-id: http://svn.dojotoolkit.org/src/branches/1.7/dojo@30042 560b804f-0ae3-0310-86f3-f6aa0a117693
---
 selector/acme.js | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/selector/acme.js b/selector/acme.js
index bfc6891..f573bce 100644
--- a/selector/acme.js
+++ b/selector/acme.js
@@ -1,8 +1,8 @@
 define(["../_base/kernel", "../has", "../dom", "../_base/sniff", "../_base/array", "../_base/lang", "../_base/window"], function(dojo, has, dom){
   //  module:
-  //    dojo/selector/acme
+  //	dojo/selector/acme
   //  summary:
-  //    This module defines the Acme selector engine
+  //	This module defines the Acme selector engine
 
 /*
 	acme architectural overview:
@@ -124,7 +124,7 @@ define(["../_base/kernel", "../has", "../dom", "../_base/sniff", "../_base/array
 
 		// state keeping vars
 		var inBrackets = -1, inParens = -1, inMatchFor = -1,
-			inPseudo = -1, inClass = -1, inId = -1, inTag = -1,
+			inPseudo = -1, inClass = -1, inId = -1, inTag = -1, currentQuoteChar,
 			lc = "", cc = "", pStart;
 
 		// iteration vars
@@ -287,6 +287,19 @@ define(["../_base/kernel", "../has", "../dom", "../_base/sniff", "../_base/array
 				inTag = x;
 			}
 
+			// Skip processing all quoted characters.
+			// If we are inside quoted text then currentQuoteChar stores the character that began the quote,
+			// thus that character that will end it.
+			if(currentQuoteChar){
+				if(cc == currentQuoteChar){
+					currentQuoteChar = null;
+				}
+				continue;
+			}else if (cc == "'" || cc == '"'){
+				currentQuoteChar = cc;
+				continue;
+			}
+
 			if(inBrackets >= 0){
 				// look for a the close first
 				if(cc == "]"){ // if we're in a [...] clause and we end, do assignment

-- 
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