server/search: escape backslashes in search
This commit is contained in:
parent
783171729f
commit
9b27e113b3
1 changed files with 3 additions and 2 deletions
|
@ -6,8 +6,9 @@ from szurubooru.search import criteria
|
||||||
|
|
||||||
def wildcard_transformer(value):
|
def wildcard_transformer(value):
|
||||||
return (value
|
return (value
|
||||||
.replace('%', r'\%')
|
.replace('\\', '\\\\')
|
||||||
.replace('_', r'\_')
|
.replace('%', '\\%')
|
||||||
|
.replace('_', '\\_')
|
||||||
.replace('*', '%'))
|
.replace('*', '%'))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue