From 65c13adf5ec319a9155b992826a5e1f7798fc590 Mon Sep 17 00:00:00 2001 From: lilia Date: Fri, 4 Dec 2015 18:00:12 -0800 Subject: [PATCH] Fix searching for numbers with parens or dashes Strip some punctuation from search queries // FREEBIE --- js/models/conversations.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/models/conversations.js b/js/models/conversations.js index b4d9c6aa..775ecb10 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -410,6 +410,7 @@ search: function(query) { query = query.trim().toLowerCase(); if (query.length > 0) { + query = query.replace(/[-.\(\)]*/g,''); var lastCharCode = query.charCodeAt(query.length - 1); var nextChar = String.fromCharCode(lastCharCode + 1); var upper = query.slice(0, -1) + nextChar;