From a043e21c8e450b2cfbae037f94ffbe16fe854685 Mon Sep 17 00:00:00 2001 From: John Schember Date: Sat, 3 Aug 2013 18:00:18 -0400 Subject: [PATCH] Store: Change punucation into spaces when using author or title searching. --- src/calibre/gui2/store/search/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/store/search/models.py b/src/calibre/gui2/store/search/models.py index af2c274bd7..96948c2363 100644 --- a/src/calibre/gui2/store/search/models.py +++ b/src/calibre/gui2/store/search/models.py @@ -451,7 +451,9 @@ class SearchFilter(SearchQueryParser): vals = accessor(sr).split(',') elif locvalue in ('author2', 'title2'): m = self.IN_MATCH - vals = re.sub(r'(^|\s)(and|not|or|a|the|is|of|,)(\s|$)', ' ', accessor(sr)).split(' ') + vals = re.sub(r'(^|\s)(and|not|or|a|the|is|of)(\s|$)', ' ', accessor(sr)) + vals = re.sub('[.,!@#$%^&*\(\)\'"\[\]]', ' ', vals) + vals = vals.split(' ') vals = [x for x in vals if x] final_query = query.lower() else: