Forum Discussion
Nigel_Price9911
Feb 22, 2018Iron Contributor
Escaping the content of a Rich Text Field
Hi
I have a field which has some mark up in the text eg. <div>, <span> so I need to escape this markup. Is there an easy way to do this in PnP PowerShell.
Regards
Nigel
Yes, there is !
$value = [System.Net.WebUtility]::HtmlEncode($fieldValue.Value)
- Nigel_Price9911Iron Contributor
Yes, there is !
$value = [System.Net.WebUtility]::HtmlEncode($fieldValue.Value)