Sanitize more special characters in search.

remotes/1693176582716663532/tmp_refs/heads/watchparty
Snakes 2022-10-04 01:31:27 -04:00
parent 7defcd07cf
commit 6757831e0f
Signed by: Snakes
GPG Key ID: E745A82778055C7E
1 changed files with 1 additions and 1 deletions

View File

@ -207,7 +207,7 @@ def searchcomments(v):
else: comments = comments.filter(Comment.author_id == author.id)
if 'q' in criteria:
tokens = map(lambda x: re.sub(r'[\0():|&*!]', '', x), criteria['q'])
tokens = map(lambda x: re.sub(r'[\0():|&*!<>]', '', x), criteria['q'])
tokens = map(lambda x: re.sub(r'\s+', ' <-> ', x), tokens)
comments = comments.filter(Comment.body_ts.match(
' & '.join(tokens),