This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Description
if the value to be displayed in the dropdown is not allowed by $sanitize it is removed. We ran into this when testing a list that included an item, ''.
The behavior is that the 'unsafe' portion of item is stripped. In another test case, the value 'aa' was rendered as 'aa' in the dropdown.
Our test case would be:
describe('"highlight" filter', function () {
var highlightFilter;
beforeEach(module('ui.select'));
beforeEach(inject(function ($filter) {
highlightFilter = $filter('highlight');
}));
it('should work correctly for html entities', function () {
expect(highlightFilter('before <match> after', 'nomatch')).toEqual('before <match> after');
expect(highlightFilter('before <match> after', '<match>')).toEqual('before <span class="ui-select-highlight"><match></span> after');
});
});
We have experimented with a number of solutions including http://codepen.io/gklandes/pen/QwXeXW. But do not have anything suitable for a pull request at this point.