From 3276e22ab689fc286b84f1ea2b57c42d0623e438 Mon Sep 17 00:00:00 2001 From: TedLiang Date: Sat, 18 Aug 2012 16:42:59 +1000 Subject: [PATCH] escape special characters in containerId selector --- select2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/select2.js b/select2.js index 76e984d0..611f27bf 100755 --- a/select2.js +++ b/select2.js @@ -942,7 +942,7 @@ */ // abstract opening: function() { - var cid = this.containerId, selector = "#"+ cid, + var cid = this.containerId, selector = "#"+ cid.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g, '\\$1'), scroll = "scroll." + cid, resize = "resize." + cid; this.container.parents().each(function() {