From db0f651f3387752f1853aa562bbab9ee6a8de93a Mon Sep 17 00:00:00 2001 From: kaso17 Date: Sun, 13 May 2018 17:42:22 +0200 Subject: [PATCH] TorrentLeech: improve dash remove code fixes #3096 --- src/Jackett.Common/Indexers/TorrentLeech.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Jackett.Common/Indexers/TorrentLeech.cs b/src/Jackett.Common/Indexers/TorrentLeech.cs index 61d1780c1..999c85089 100644 --- a/src/Jackett.Common/Indexers/TorrentLeech.cs +++ b/src/Jackett.Common/Indexers/TorrentLeech.cs @@ -4,6 +4,7 @@ using System.Globalization; using System.Linq; using System.Net; using System.Text; +using System.Text.RegularExpressions; using System.Threading.Tasks; using CsQuery; using Jackett.Common.Models; @@ -177,7 +178,7 @@ namespace Jackett.Common.Indexers { var releases = new List(); var searchString = query.GetQueryString(); - searchString = searchString.Replace('-', ' '); // remove dashes as they exclude search strings + searchString = Regex.Replace(searchString, @"(^|\s)-", " "); // remove dashes at the beginning of keywords as they exclude search strings (see issue #3096) var searchUrl = SearchUrl; if (!string.IsNullOrWhiteSpace(searchString))