Jelte Fennema 12 лет назад
Родитель
Сommit
c0dd741a79
1 измененных файлов с 7 добавлено и 8 удалено
  1. 7 8
      select2.js

+ 7 - 8
select2.js

@@ -2442,16 +2442,15 @@ the specific language governing permissions and limitations under the Apache Lic
         escapeMarkup: function (markup) {
             var replace_map = {
                 '\\': '\',
-                '&': '&#amp;',
-                '<': '&#lt;',
-                '>': '&#rt;',
-                '"': '&#quot;',
-                "'": '&#39;',
-                "/": '&#x2F;'
+                '&': '&amp;',
+                '<': '&lt;',
+                '>': '&gt;',
+                '"': '&quot;',
+                "'": '&apos;',
+                "/": '&#47;'
             };
-            //'--': '-&#45;'
 
-            return String(html).replace(/[&<>"'/\\]/g, function (match) {
+            return String(markup).replace(/[&<>"'/\\]/g, function (match) {
                     return replace_map[match[0]];
             });