diff --git a/src/js/select2/selection/multiple.js b/src/js/select2/selection/multiple.js index 7c0e336bd0..aa0afe4557 100644 --- a/src/js/select2/selection/multiple.js +++ b/src/js/select2/selection/multiple.js @@ -126,7 +126,7 @@ define([ formatted = Utils.entityDecode(formatted.trim()); } - $selection.text(formatted); + $selection.append(formatted); $selection.prepend(removeItemTag); $selection.prop('title', selection.title || selection.text); diff --git a/src/js/select2/selection/single.js b/src/js/select2/selection/single.js index 6aba2c0183..20e74492d1 100644 --- a/src/js/select2/selection/single.js +++ b/src/js/select2/selection/single.js @@ -111,7 +111,7 @@ define([ var $rendered = this.$selection.find('.select2-selection__rendered'); var formatted = Utils.entityDecode(this.display(selection, $rendered)); - $rendered.empty().text(formatted); + $rendered.empty().append(formatted); $rendered.prop('title', selection.title || selection.text); };