src/Private/Core/ConvertTo-FotonSafeHtml.ps1
|
function ConvertTo-FotonSafeHtml { <# Escape for HTML report bodies. All untrusted strings must pass through here. #> param([string]$Text) if ($null -eq $Text) { return '' } $s = [string]$Text $s = $s.Replace('&', '&').Replace('<', '<').Replace('>', '>').Replace('"', '"').Replace("'", ''') return $s } |