regex-escape search terms

This commit is contained in:
Cal 2024-05-15 13:27:58 -06:00
parent f07ead5008
commit 1c038a030d

View file

@ -322,7 +322,7 @@ class ObjectDBManager(TypedObjectManager):
)
# convert search term to partial-match regex
search_regex = r".* ".join(word for word in ostring.split())
search_regex = r".* ".join(re.escape(word) for word in ostring.split())
# do the fuzzy search and return whatever it matches
return (