remove backslash from string to prevent syntax error in tsquery

pull/5006/head
Hammy Goonan 2019-01-17 15:47:44 +11:00 zatwierdzone przez Bertrand Bordage
rodzic 057690815b
commit af6bf164ec
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -228,7 +228,9 @@ class PostgresSearchQueryCompiler(BaseSearchQueryCompiler):
return self.get_search_field(sub_field_name, field.fields)
def prepare_word(self, word):
return unidecode(word)
# remove backslash from string to prevent syntax error in tsquery
stripped_word = word.replace("\\", "")
return unidecode(stripped_word)
def build_tsquery_content(self, query, group=False):
if isinstance(query, PlainText):