fix: add slash in DEFAULT_ESCAPED_CHARS (#312) (#376)

This commit is contained in:
Manabu Niseki 2022-09-11 22:50:15 +09:00 committed by GitHub
parent 551429c01a
commit 285f7c90ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,7 +9,7 @@ class TokenEscaper:
# Characters that RediSearch requires us to escape during queries. # Characters that RediSearch requires us to escape during queries.
# Source: https://redis.io/docs/stack/search/reference/escaping/#the-rules-of-text-field-tokenization # Source: https://redis.io/docs/stack/search/reference/escaping/#the-rules-of-text-field-tokenization
DEFAULT_ESCAPED_CHARS = r"[,.<>{}\[\]\\\"\':;!@#$%^&*()\-+=~\ ]" DEFAULT_ESCAPED_CHARS = r"[,.<>{}\[\]\\\"\':;!@#$%^&*()\-+=~\/ ]"
def __init__(self, escape_chars_re: Optional[Pattern] = None): def __init__(self, escape_chars_re: Optional[Pattern] = None):
if escape_chars_re: if escape_chars_re: