Skip to content

Commit 9f7e990

Browse files
committed
switched from [System.Web.HttpUtility]::UrlEncode() to [uri]::EscapeDataString() to remove dependency on System.Web
1 parent 4bb3b2b commit 9f7e990

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

Posh-IBWAPI/Posh-IBWAPI.psd1

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ CompatiblePSEditions = @('Desktop','Core')
1010
PowerShellVersion = '5.1'
1111
DotNetFrameworkVersion = '4.5.2'
1212

13-
RequiredAssemblies = @(
14-
'System.Web'
15-
)
16-
1713
FormatsToProcess = 'Posh-IBWAPI.Format.ps1xml'
1814

1915
FunctionsToExport = @(

Posh-IBWAPI/Public/Get-IBObject.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function Get-IBObject
8787
# URL encode the pairs and join with '=' before adding
8888
$Filter.GetEnumerator().foreach{
8989
$queryargs.Add(
90-
('{0}={1}' -f [Web.HttpUtility]::UrlEncode($_.Key),[Web.HttpUtility]::UrlEncode($_.Value.ToString()))
90+
('{0}={1}' -f [uri]::EscapeDataString($_.Key),[uri]::EscapeDataString($_.Value.ToString()))
9191
)
9292
}
9393
}

0 commit comments

Comments
 (0)