Private/Convert-HTMLCharacter.ps1
function Convert-HTMLCharacter { [CmdletBinding()] param ( [Parameter(Mandatory = $true, Position = 0)] [string]$String ) process { $String = $String -replace '"', '"' ` -replace '&', '&' ` -replace ''', "'" ` -replace '<', '<' ` -replace '>', '>' ` -replace ''', "'" ` -replace '#39;s', "'" ` -replace '※', '.*.' ` -replace ''', "'" ` -replace ''', '' $newString = $String.Trim() # Write-Debug "[$($MyInvocation.MyCommand.Name)] Begin String: [$String]; End string: [$newString]" Write-Output $newString } } |