From dff4a032083700b25c9b64d48dbe592e5b338569 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 17 May 2016 23:26:48 +0200 Subject: [PATCH] Added regex quoting of query. --- app/assets/javascripts/app/lib/app_post/searchable_select.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/javascripts/app/lib/app_post/searchable_select.coffee b/app/assets/javascripts/app/lib/app_post/searchable_select.coffee index 3c429192b..72240602b 100644 --- a/app/assets/javascripts/app/lib/app_post/searchable_select.coffee +++ b/app/assets/javascripts/app/lib/app_post/searchable_select.coffee @@ -163,6 +163,7 @@ class App.SearchableSelect extends Spine.Controller @filterByQuery @query filterByQuery: (query) -> + query = escapeRegExp(query) regex = new RegExp(query.split(' ').join('.*'), 'i') @option_items