server/search: escape backslashes in search

This commit is contained in:
rr- 2017-01-21 00:20:32 +01:00
parent 783171729f
commit 9b27e113b3
1 changed files with 3 additions and 2 deletions

View File

@ -6,8 +6,9 @@ from szurubooru.search import criteria
def wildcard_transformer(value):
return (value
.replace('%', r'\%')
.replace('_', r'\_')
.replace('\\', '\\\\')
.replace('%', '\\%')
.replace('_', '\\_')
.replace('*', '%'))