From f4570f39d704b24e07f4f2f5d8bfe11982fd8b12 Mon Sep 17 00:00:00 2001 From: Andrew Dupont Date: Mon, 13 Jul 2009 14:12:18 +0200 Subject: [PATCH] Fix issue related to escaping of selectors for querySelectorAll. [#559 state:resolved] --- CHANGELOG | 2 ++ src/dom/selector.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 2020a1e..e803f08 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +* Fix issue related to escaping of selectors for querySelectorAll. [#559 state:resolved] (Jorn Holm) + *1.6.1_rc3* (June 16, 2009) * Fixed a variety of non-ASCII chars and similar [#610 state:resolved] (T.J. Crowder) diff --git a/src/dom/selector.js b/src/dom/selector.js index 4b72261..7d30418 100644 --- a/src/dom/selector.js +++ b/src/dom/selector.js @@ -170,7 +170,7 @@ var Selector = Class.create({ if (root !== document) { var oldId = root.id, id = $(root).identify(); // Escape special characters in the ID. - id = id.replace(/[\.:]/g, "\\$0"); + id = id.replace(/[\.:]/g, "\\$1"); e = "#" + id + " " + e; }