param( [Parameter(Mandatory)][string]$JsonData, [Parameter(Mandatory)][string]$OutputPath ) # Escape for safe embedding in JS string literal $escaped = $JsonData -replace '\\', '\\\\' -replace "'", "\\\'" -replace "`r`n", '\n' -replace "`n", '\n' $html = @'