rutracker: no regex replace when SearchTerm is null. #13660 (#13664)

fix for https://github.com/Jackett/Jackett/pull/13661#issuecomment-1286567697
This commit is contained in:
ilike2burnthing
2022-10-21 16:32:21 +01:00
committed by GitHub
parent 4502f5f771
commit 00dc9f5dcc

View File

@@ -1484,7 +1484,8 @@ namespace Jackett.Common.Indexers
var searchString = query.SearchTerm;
// replace any space, special char, etc. with % (wildcard)
var ReplaceRegex = new Regex("[^a-zA-Zа-яА-Я0-9]+");
searchString = ReplaceRegex.Replace(searchString, "%");
if (!string.IsNullOrWhiteSpace(searchString))
searchString = ReplaceRegex.Replace(searchString, "%");
// if the search string is empty use the getnew view
if (string.IsNullOrWhiteSpace(searchString))