Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'search_contains' breaks search while escaping strings #2548

Open
ninboy opened this issue Feb 23, 2016 · 1 comment
Open

'search_contains' breaks search while escaping strings #2548

ninboy opened this issue Feb 23, 2016 · 1 comment
Labels

Comments

@ninboy
Copy link

ninboy commented Feb 23, 2016

Chosen now escapes correctly the quotes in the values ('), but there is a problem with the escape string while the option "search_contains" is active.

If you have an item with a quote the search will try to match against ' and not ', making wrong results appear if you search for: #, x, 2, 7 or ;.

A small example is linked here: https://jsbin.com/luqusu/edit?html,output

Searching with search_contains = false makes the problem go away.

@IanSimpson
Copy link

This issue is also present if an optgroup or option contains any html special character - >, <, &, etc. I've submitted a PR with a proposed fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants