From ec412e90970a95c117d68cce39b2d24b85e5d69f 2014-10-06 19:59:16 From: MinRK Date: 2014-10-06 19:59:16 Subject: [PATCH] don't use contains in SelectWidget item_query gives false positive matches when some values are substrings of others --- diff --git a/IPython/html/static/widgets/js/widget_selection.js b/IPython/html/static/widgets/js/widget_selection.js index 1f411d5..a40433c 100644 --- a/IPython/html/static/widgets/js/widget_selection.js +++ b/IPython/html/static/widgets/js/widget_selection.js @@ -403,7 +403,7 @@ define([ var items = this.model.get('value_names'); var that = this; _.each(items, function(item, index) { - var item_query = ' :contains("' + item + '")'; + var item_query = 'option[value_name="' + item + '"]'; if (that.$listbox.find(item_query).length === 0) { $('