diff --git a/select2.js b/select2.js index 60f80864..56322556 100644 --- a/select2.js +++ b/select2.js @@ -1911,7 +1911,7 @@ the specific language governing permissions and limitations under the Apache Lic || (e.which == KEY.ENTER && this.opts.openOnEnter)) { if (e.altKey || e.ctrlKey || e.shiftKey || e.metaKey) return; - + this.open(); killEvent(e); return; @@ -2174,9 +2174,9 @@ the specific language governing permissions and limitations under the Apache Lic this.selection.data("select2-data", data); container.empty(); - formatted=this.opts.formatSelection(data, container); + formatted=this.opts.formatSelection(data, container, this.opts.escapeMarkup); if (formatted !== undefined) { - container.append(this.opts.escapeMarkup(formatted)); + container.append(formatted); } cssClass=this.opts.formatSelectionCssClass(data, container); if (cssClass !== undefined) { @@ -2722,9 +2722,9 @@ the specific language governing permissions and limitations under the Apache Lic formatted, cssClass; - formatted=this.opts.formatSelection(data, choice.find("div")); + formatted=this.opts.formatSelection(data, choice.find("div"), this.opts.escapeMarkup); if (formatted != undefined) { - choice.find("div").replaceWith("