rabihkodeih / bootstrap-transfer

This is a two-column transfer multi-select widget inspired by Django admin module's similar widget.
Other
45 stars 46 forks source link

Bootstrap-transfer doesn't handle ampersands correctly #3

Open cdeyoung opened 12 years ago

cdeyoung commented 12 years ago

Bootstrap-transfer isn't handling values with ampersands correctly. In order to accommodate values with ampersands, I changes the following lines:

if (!force_hilite_off && settings.hilite_selection && !old[i].hasOwnProperty(e[0].value))

and

if (e[0].value == val)

to:

if (!force_hilite_off && settings.hilite_selection && !old[i].hasOwnProperty(e[0].value.replace('&', '&')))

and

if (e[0].value.replace('&', '&') == val.replace('&', '&'))

I hope this helps.