From 43559bbd1bb75b59b1796f7447c22f640f9c4855 Mon Sep 17 00:00:00 2001 From: "Martin Hinshelwood nkdAgility.com" Date: Mon, 23 Sep 2024 16:30:17 +0100 Subject: [PATCH] Add Uri.UnescapeDataString(options.Collection.ToString()) --- .../Endpoints/TfsEndpointOptions.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsEndpointOptions.cs b/src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsEndpointOptions.cs index 717a9a95..ebe2556f 100644 --- a/src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsEndpointOptions.cs +++ b/src/MigrationTools.Clients.TfsObjectModel/Endpoints/TfsEndpointOptions.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; +using System.Text.Encodings.Web; using Microsoft.Extensions.Options; using MigrationTools.Endpoints.Infrastructure; using Newtonsoft.Json; @@ -44,8 +45,8 @@ public ValidateOptionsResult Validate(string name, TfsEndpointOptions options) } else { - Uri output; - if (!Uri.TryCreate(options.Collection.ToString(), UriKind.Absolute, out output)) + Uri output; + if (!Uri.TryCreate(Uri.UnescapeDataString(options.Collection.ToString()), UriKind.Absolute, out output)) { errors.Add("The Collection property must be a valid URL."); }