Skip to content

Commit

Permalink
Add Uri.UnescapeDataString(options.Collection.ToString())
Browse files Browse the repository at this point in the history
  • Loading branch information
MrHinsh committed Sep 23, 2024
1 parent 16f3ed6 commit 43559bb
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.");
}
Expand Down

0 comments on commit 43559bb

Please sign in to comment.