diff --git a/src/Kp2aBusinessLogic/SearchDbHelper.cs b/src/Kp2aBusinessLogic/SearchDbHelper.cs index a51e0b7a1..b21d271b8 100644 --- a/src/Kp2aBusinessLogic/SearchDbHelper.cs +++ b/src/Kp2aBusinessLogic/SearchDbHelper.cs @@ -138,7 +138,8 @@ public PwGroup SearchForHost(Database database, String url, bool allowSubdomains { continue; } - if (host.IndexOf(otherHost, StringComparison.InvariantCultureIgnoreCase) > -1) + if (string.Equals(host, otherHost, StringComparison.OrdinalIgnoreCase) || + host.EndsWith("." + otherHost, StringComparison.OrdinalIgnoreCase)) { pgResults.AddEntry(entry, false); }