Pārlūkot izejas kodu

Santize automatically generated ids

This closes https://github.com/select2/select2/issues/3618.
This closes https://github.com/select2/select2/pull/4123.
Ben 9 gadi atpakaļ
vecāks
revīzija
65179f16de
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1 0
      src/js/select2/core.js

+ 1 - 0
src/js/select2/core.js

@@ -99,6 +99,7 @@ define([
       id = Utils.generateChars(4);
     }
 
+    id = id.replace(/(:|\.|\[|\]|,)/g, '');
     id = 'select2-' + id;
 
     return id;