Skip to content

Commit

Permalink
Merge pull request #2361 from microsoftgraph/2280-get-mggroup-filter-…
Browse files Browse the repository at this point in the history
…with-special-characters-doesnt-work

Fix escaping of filter values with displayName
  • Loading branch information
timayabi2020 authored Nov 3, 2023
2 parents 42d4aae + 1cc6066 commit 9938137
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/Custom/PSCmdletExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ namespace NamespacePrefixPlaceholder.PowerShell
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using System.Text.RegularExpressions;

internal static class PSCmdletExtensions
{
Expand All @@ -28,7 +29,7 @@ internal static string UnescapeString(this PSCmdlet cmdlet, string value)
try
{
var unescapedString = Uri.UnescapeDataString(value);
return unescapedString.Replace('+', ' ');
return value.EndsWith("'") ? unescapedString: unescapedString.Replace('+', ' ');
}
catch (UriFormatException ex)
{
Expand Down

0 comments on commit 9938137

Please sign in to comment.