mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix non-escaped '|' when searching for commas in authors using REGEXP_MATCH
This commit is contained in:
commit
c946c4f3d2
@ -707,7 +707,10 @@ class ResultCache(SearchQueryParser): # {{{
|
|||||||
for loc in location: # location is now an array of field indices
|
for loc in location: # location is now an array of field indices
|
||||||
if loc == db_col['authors']:
|
if loc == db_col['authors']:
|
||||||
### DB stores authors with commas changed to bars, so change query
|
### 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:
|
else:
|
||||||
q = query
|
q = query
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user