diff --git a/server/szurubooru/search/configs/util.py b/server/szurubooru/search/configs/util.py index 28418db3..d3cb5849 100644 --- a/server/szurubooru/search/configs/util.py +++ b/server/szurubooru/search/configs/util.py @@ -5,7 +5,10 @@ from szurubooru.search import criteria def wildcard_transformer(value): - return value.replace('*', '%') + return (value + .replace('%', r'\%') + .replace('_', r'\_') + .replace('*', '%')) def apply_num_criterion_to_column(column, criterion):