mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
server/search: escape backslashes in search
This commit is contained in:
@ -6,8 +6,9 @@ from szurubooru.search import criteria
|
||||
|
||||
def wildcard_transformer(value):
|
||||
return (value
|
||||
.replace('%', r'\%')
|
||||
.replace('_', r'\_')
|
||||
.replace('\\', '\\\\')
|
||||
.replace('%', '\\%')
|
||||
.replace('_', '\\_')
|
||||
.replace('*', '%'))
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user