Fix comment search query ampersand bug.
parent
8e2c869c84
commit
be7be28182
|
@ -208,6 +208,7 @@ def searchcomments(v):
|
|||
|
||||
if 'q' in criteria:
|
||||
tokens = map(lambda x: re.sub(r'[\0():|&*!<>]', '', x), criteria['q'])
|
||||
tokens = filter(lambda x: len(x) > 0, tokens)
|
||||
tokens = map(lambda x: re.sub(r'\s+', ' <-> ', x), tokens)
|
||||
comments = comments.filter(Comment.body_ts.match(
|
||||
' & '.join(tokens),
|
||||
|
|
Loading…
Reference in New Issue