Forum Discussion

Nigel_Price9911's avatar
Nigel_Price9911
Iron Contributor
Feb 22, 2018

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)

     

  • Yes, there is !

     

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

     

Resources