We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 08ee57a + d385dc5 commit c1df0aaCopy full SHA for c1df0aa
1 file changed
select2.js
@@ -3058,7 +3058,7 @@ the specific language governing permissions and limitations under the Apache Lic
3058
3059
formatted=this.opts.formatSelection(data, choice.find("div"), this.opts.escapeMarkup);
3060
if (formatted != undefined) {
3061
- choice.find("div").replaceWith("<div>"+formatted+"</div>");
+ choice.find("div").replaceWith($("<div></div>").html(formatted));
3062
}
3063
cssClass=this.opts.formatSelectionCssClass(data, choice.find("div"));
3064
if (cssClass != undefined) {
0 commit comments