From caf5b4f736a6a11e3689aced04c66606bdf7c16d Mon Sep 17 00:00:00 2001 From: Casey Holzer Date: Thu, 20 Oct 2016 15:36:14 -0600 Subject: [PATCH] allow HTML in placeholder title for non-multiple selects (close #1440) --- js/bootstrap-select.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/bootstrap-select.js b/js/bootstrap-select.js index e19658608..66ac23a49 100644 --- a/js/bootstrap-select.js +++ b/js/bootstrap-select.js @@ -580,7 +580,7 @@ // Use native JS to prepend option (faster) var element = this.$element[0]; titleOption.className = 'bs-title-option'; - titleOption.appendChild(document.createTextNode(this.options.title)); + titleOption.innerHTML = this.options.title; titleOption.value = ''; element.insertBefore(titleOption, element.firstChild); // Check if selected or data-selected attribute is already set on an option. If not, select the titleOption option.