{"action":"opened","issue":{"url":"https://api.github.com/repos/harvesthq/chosen/issues/2548","repository_url":"https://api.github.com/repos/harvesthq/chosen","labels_url":"https://api.github.com/repos/harvesthq/chosen/issues/2548/labels{/name}","comments_url":"https://api.github.com/repos/harvesthq/chosen/issues/2548/comments","events_url":"https://api.github.com/repos/harvesthq/chosen/issues/2548/events","html_url":"https://github.com/harvesthq/chosen/issues/2548","id":135748340,"number":2548,"title":"'search_contains' breaks search while escaping strings","user":{"login":"ninboy","id":34670,"avatar_url":"https://avatars.githubusercontent.com/u/34670?v=3","gravatar_id":"","url":"https://api.github.com/users/ninboy","html_url":"https://github.com/ninboy","followers_url":"https://api.github.com/users/ninboy/followers","following_url":"https://api.github.com/users/ninboy/following{/other_user}","gists_url":"https://api.github.com/users/ninboy/gists{/gist_id}","starred_url":"https://api.github.com/users/ninboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninboy/subscriptions","organizations_url":"https://api.github.com/users/ninboy/orgs","repos_url":"https://api.github.com/users/ninboy/repos","events_url":"https://api.github.com/users/ninboy/events{/privacy}","received_events_url":"https://api.github.com/users/ninboy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-23T14:15:43Z","updated_at":"2016-02-23T14:15:43Z","closed_at":null,"body":"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.\r\n\r\nIf you have an item with a quote the search will try to match against `&#x27;` and not `'`, making wrong results appear if you search for: `#`, `x`, `2`, `7` or `;`.\r\n\r\nA small example is linked here: https://jsbin.com/luqusu/edit?html,output\r\n\r\nSearching with `search_contains = false` makes the problem go away."}}