Skip to content

Commit 00058ab

Browse files
committed
fix markup escaping. fixes select2#268
1 parent bb51eb7 commit 00058ab

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

select2.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,13 @@
9292

9393
nextUid=(function() { var counter=1; return function() { return counter++; }; }());
9494

95-
function escapeMarkup(markup) { return markup.replace("&", "&"); }
95+
function escapeMarkup(markup) {
96+
if (typeof(markup) === "string") {
97+
return markup.replace("&", "&");
98+
} else {
99+
return markup;
100+
}
101+
}
96102

97103
function indexOf(value, array) {
98104
var i = 0, l = array.length, v;

0 commit comments

Comments
 (0)