Private/Convert-HTMLCharacter.ps1
function Convert-HTMLCharacter { [CmdletBinding()] param ( [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)] [AllowEmptyString()] [String]$String ) process { $String = $String -replace '"', '"' ` -replace '&', '&' ` -replace ''', "'" ` -replace '<', '<' ` -replace '>', '>' ` -replace ''', "'" ` -replace '#39;s', "'" ` -replace '※', '.*.' ` -replace ''', "'" ` -replace ''', '' ` -replace ' ', '' ` -replace '', '' # Seemingly invisible character that appears in mgstage $newString = $String.Trim() if ($newString -eq '') { $newString = $null } Write-Output $newString } } |