From 99304b995af0e00c5ddc6d944e42daa2c8f84e71 Mon Sep 17 00:00:00 2001 From: Shubham Date: Mon, 6 Jan 2020 14:03:47 -0500 Subject: [PATCH] Selected option retains html tags --- js/jquery.nice-select.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/jquery.nice-select.js b/js/jquery.nice-select.js index 57fe3b2..961a49a 100644 --- a/js/jquery.nice-select.js +++ b/js/jquery.nice-select.js @@ -120,8 +120,8 @@ $dropdown.find('.selected').removeClass('selected'); $option.addClass('selected'); - var text = $option.data('display') || $option.text(); - $dropdown.find('.current').text(text); + var html = $option.data('display') || $option.html(); + $dropdown.find('.current').html(html); $dropdown.prev('select').val($option.data('value')).trigger('change'); });