@@ -51,7 +51,7 @@ class AbstractChosen
51
51
52
52
choice_label : (item ) ->
53
53
if @include_group_label_in_selected and item .group_label ?
54
- " <b class='group-name'>#{ item .group_label } </b>#{ item .html } "
54
+ " <b class='group-name'>#{ this . escape_html ( item .group_label ) } </b>#{ item .html } "
55
55
else
56
56
item .html
57
57
@@ -114,7 +114,7 @@ class AbstractChosen
114
114
115
115
option_el = document .createElement (" li" )
116
116
option_el .className = classes .join (" " )
117
- option_el .style .cssText = option .style
117
+ option_el .style .cssText = option .style if option . style
118
118
option_el .setAttribute (" data-option-array-index" , option .array_index )
119
119
option_el .innerHTML = option .highlighted_html or option .html
120
120
option_el .title = option .title if option .title
@@ -159,7 +159,7 @@ class AbstractChosen
159
159
else
160
160
this .results_show ()
161
161
162
- winnow_results : ->
162
+ winnow_results : ( options ) ->
163
163
this .no_results_clear ()
164
164
165
165
results = 0
@@ -214,7 +214,7 @@ class AbstractChosen
214
214
this .no_results query
215
215
else
216
216
this .update_results_content this .results_option_build ()
217
- this .winnow_results_set_highlight ()
217
+ this .winnow_results_set_highlight () unless options ? . skip_highlight
218
218
219
219
get_search_regex : (escaped_search_string ) ->
220
220
regex_string = if @search_contains then escaped_search_string else " (^|\\ s|\\ b)#{ escaped_search_string} [^\\ s]*"
@@ -332,12 +332,12 @@ class AbstractChosen
332
332
get_single_html : ->
333
333
"""
334
334
<a class="chosen-single chosen-default">
335
- <input class="chosen-search-input" type="text" autocomplete="off" />
336
335
<span>#{ @default_text } </span>
337
336
<div><b></b></div>
338
337
</a>
339
338
<div class="chosen-drop">
340
339
<div class="chosen-search">
340
+ <input class="chosen-search-input" type="text" autocomplete="off" />
341
341
</div>
342
342
<ul class="chosen-results"></ul>
343
343
</div>
0 commit comments