krazedkrish / select-multiple

"An awesome user-friendlier drop-in replacement for the standard select with multiple attribute activated.
MIT License
76 stars 20 forks source link

feature: escapeHTML method as option #11

Closed pcboy closed 8 years ago

pcboy commented 8 years ago

Hi,

I wanted to show some information (e.g percentages) on the right side of each element. Like in this screenshot:

image

Problem is, you are calling escapeHTML() on every element which is itself calling text(). So all my html is stripped. That makes it impossible to have more complicated li elements. By making the escapeHTML method available as an option I can override it easily and make this possible. Maybe simply giving an option to not escape the HTML is another possibility we could implement.

pcboy commented 8 years ago

I finally decided to add an allowHTML option instead. Looks better to me.

See https://github.com/krazedkrish/select-multiple/pull/12