mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-18 11:13:34 +02:00
Fix non-escaped '|' when searching for commas in authors using REGEXP_MATCH
This commit is contained in:
parent
d7f17e9a19
commit
640c4ff784
1 changed files with 4 additions and 1 deletions
|
|
@ -707,7 +707,10 @@ def get_matches(self, location, query, candidates=None,
|
|||
for loc in location: # location is now an array of field indices
|
||||
if loc == db_col['authors']:
|
||||
### DB stores authors with commas changed to bars, so change query
|
||||
q = query.replace(',', '|');
|
||||
if matchkind == REGEXP_MATCH:
|
||||
q = query.replace(',', r'\|');
|
||||
else:
|
||||
q = query.replace(',', '|');
|
||||
else:
|
||||
q = query
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue