Explorar o código

escape special characters in containerId selector

TedLiang %!s(int64=12) %!d(string=hai) anos
pai
achega
3276e22ab6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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() {