ソースを参照

escape special characters in containerId selector

TedLiang 12 年 前
コミット
3276e22ab6
1 ファイル変更1 行追加1 行削除
  1. 1 1
      select2.js

+ 1 - 1
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() {