Escape ":" and "." characters when doing contextual CSS selection in browsers that support querySelectorAll. [#559 state:resolved] (fxtentacle, Andrew Dupont)
This commit is contained in:
parent
9da5045df2
commit
97fc24a0b2
|
@ -1,3 +1,5 @@
|
|||
* Escape ":" and "." characters when doing contextual CSS selection in browsers that support querySelectorAll. [#559 state:resolved] (fxtentacle, Andrew Dupont)
|
||||
|
||||
* Ensure the `target` property on events is never undefined in IE. [#383 state:resolved] (Mathias Karstädt, Diego Perini, Andrew Dupont)
|
||||
|
||||
* Ensure Element#descendants always returns an array. [#373 state:resolved] (kangax)
|
||||
|
|
|
@ -122,9 +122,11 @@ var Selector = Class.create({
|
|||
// Add an explicit context to the selector if necessary.
|
||||
if (root !== document) {
|
||||
var oldId = root.id, id = $(root).identify();
|
||||
// Escape special characters in the ID.
|
||||
id = id.replace(/[\.:]/g, "\\$0");
|
||||
e = "#" + id + " " + e;
|
||||
}
|
||||
|
||||
|
||||
results = $A(root.querySelectorAll(e)).map(Element.extend);
|
||||
root.id = oldId;
|
||||
|
||||
|
|
Loading…
Reference in New Issue