Pārlūkot izejas kodu

escape special characters in containerId selector

TedLiang 12 gadi atpakaļ
vecāks
revīzija
3276e22ab6
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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() {