From 6a0a4a3a5230e823b812b98272c5e011d07aac35 Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Mon, 18 Aug 2014 04:00:45 -0400
Subject: [PATCH] Remove empty brackets, slashes and spaces from contact search name

---
 program/lib/Roundcube/rcube_addressbook.php |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/program/lib/Roundcube/rcube_addressbook.php b/program/lib/Roundcube/rcube_addressbook.php
index 71d5562..5bc3edf 100644
--- a/program/lib/Roundcube/rcube_addressbook.php
+++ b/program/lib/Roundcube/rcube_addressbook.php
@@ -605,7 +605,8 @@
         }
 
         $result = preg_replace('/\s+/', ' ', $result);
-        $result = trim($result);
+        $result = preg_replace('/\s*(<>|\(\)|\[\])/', '', $result);
+        $result = trim($result, '/ ');
 
         return $result;
     }

--
Gitblit v1.9.1