forked from rDrama/rDrama
fix 500 error
parent
67a29b9a51
commit
362cd288d8
|
@ -36,6 +36,7 @@ def searchparse(text):
|
||||||
criteria['q'] = []
|
criteria['q'] = []
|
||||||
for m in search_token_regex.finditer(text):
|
for m in search_token_regex.finditer(text):
|
||||||
token = m[1] if m[1] else m[2]
|
token = m[1] if m[1] else m[2]
|
||||||
|
if not token: token = ''
|
||||||
# Escape SQL pattern matching special characters
|
# Escape SQL pattern matching special characters
|
||||||
token = token.replace('\\', '').replace('_', '\_').replace('%', '\%')
|
token = token.replace('\\', '').replace('_', '\_').replace('%', '\%')
|
||||||
criteria['q'].append(token)
|
criteria['q'].append(token)
|
||||||
|
|
Loading…
Reference in New Issue