Skip to content

Commit 9938137

Browse files
authored
Merge pull request #2361 from microsoftgraph/2280-get-mggroup-filter-with-special-characters-doesnt-work
Fix escaping of filter values with displayName
2 parents 42d4aae + 1cc6066 commit 9938137

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/Custom/PSCmdletExtensions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ namespace NamespacePrefixPlaceholder.PowerShell
1414
using System.Net.Http;
1515
using System.Threading;
1616
using System.Threading.Tasks;
17+
using System.Text.RegularExpressions;
1718

1819
internal static class PSCmdletExtensions
1920
{
@@ -28,7 +29,7 @@ internal static string UnescapeString(this PSCmdlet cmdlet, string value)
2829
try
2930
{
3031
var unescapedString = Uri.UnescapeDataString(value);
31-
return unescapedString.Replace('+', ' ');
32+
return value.EndsWith("'") ? unescapedString: unescapedString.Replace('+', ' ');
3233
}
3334
catch (UriFormatException ex)
3435
{

0 commit comments

Comments
 (0)