gfranko / jquery.selectBoxIt.js

A jQuery Select Box Plugin for Mobile, Tablet, and Desktop
http://www.selectboxit.com
MIT License
852 stars 301 forks source link

Options in select box it ending with `']` #359

Open gsuero opened 8 years ago

gsuero commented 8 years ago

Whenever you have an option that its value ends with '] it's breaking the selectBoxIt plugin because of the following code across the plugin:

var currentElem = self.list.find("li[data-val='" + self.dropdownText.attr("data-val") + "']"),activeElem;

Having the option test'] will end the above function use a selector like:

li[data-val='test']']

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/30467122-options-in-select-box-it-ending-with?utm_campaign=plugin&utm_content=tracker%2F23157&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F23157&utm_medium=issues&utm_source=github).