From fcd25bc75fc36a7129bfb481a8553ec13f0a01a9 Mon Sep 17 00:00:00 2001 From: Martin Tirion Date: Mon, 20 Mar 2023 11:55:32 +0100 Subject: [PATCH] Excluded ftp and xref protocols from validation. Changed check for @ sign to use of mailto protocol --- src/DocLinkChecker/Program.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/DocLinkChecker/Program.cs b/src/DocLinkChecker/Program.cs index b1a472a..883fab8 100644 --- a/src/DocLinkChecker/Program.cs +++ b/src/DocLinkChecker/Program.cs @@ -385,7 +385,10 @@ private static void ProcessFile(DirectoryInfo folder, string filepath) // check link if not to a URL, in-doc link or e-mail address if (!relative.StartsWith("http:") && !relative.StartsWith("https:") && - !relative.Contains("@") && + !relative.StartsWith("ftp:") && + !relative.StartsWith("ftps:") && + !relative.StartsWith("xref:") && + !relative.StartsWith("mailto:") && !string.IsNullOrEmpty(Path.GetExtension(relative)) && !string.IsNullOrWhiteSpace(relative)) {