SOLVED

Escaping the content of a Rich Text Field

Regular Contributor

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

1 Reply
Highlighted
Best Response confirmed by Nigel Price (Regular Contributor)
Solution

Yes, there is !

 

$value = [System.Net.WebUtility]::HtmlEncode($fieldValue.Value)