diff --git a/public/javascripts/chosen.js b/public/javascripts/chosen.js index 733090b058..aff38f83bc 100644 --- a/public/javascripts/chosen.js +++ b/public/javascripts/chosen.js @@ -538,8 +538,8 @@ if (searchText.length) { startpos = option.html.search(zregex); text = $('
').html(option.html).text(); - text = text.substr(0, startpos + searchText.length) + '' + text.substr(startpos + searchText.length); - text = text.substr(0, startpos) + '' + text.substr(startpos); + text = text.substr(0, startpos + searchText.length) + text.substr(startpos + searchText.length); + text = text.substr(0, startpos) + text.substr(startpos); } else { text = option.html; }