Fix non-escaped '|' when searching for commas in authors using REGEXP_MATCH

This commit is contained in:
Charles Haley 2011-04-19 15:02:37 +01:00
parent d7f17e9a19
commit 640c4ff784

View File

@ -707,7 +707,10 @@ class ResultCache(SearchQueryParser): # {{{
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