We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c5c42ea commit d385dc5Copy full SHA for d385dc5
1 file changed
select2.js
@@ -3052,7 +3052,7 @@ the specific language governing permissions and limitations under the Apache Lic
3052
3053
formatted=this.opts.formatSelection(data, choice.find("div"), this.opts.escapeMarkup);
3054
if (formatted != undefined) {
3055
- choice.find("div").replaceWith("<div>"+formatted+"</div>");
+ choice.find("div").replaceWith($("<div></div>").html(formatted));
3056
}
3057
cssClass=this.opts.formatSelectionCssClass(data, choice.find("div"));
3058
if (cssClass != undefined) {
0 commit comments